This function calculates the Proportion of Ambiguous Clustering (PAC) to help evaluate the optimal number of clusters in a consensus clustering analysis.
Arguments
- consensus_result
A list containing consensus clustering results from ConsensusClusterPlus.
- range_clusters
Integer vector. The range of cluster numbers evaluated during consensus clustering.
- x1
Numeric. Lower bound for defining the PAC (default: 0.1).
- x2
Numeric. Upper bound for defining the PAC (default: 0.9).
Details
The PAC is calculated as the difference between the cumulative distribution function values at two thresholds, x2 and x1, on the consensus matrix values. A lower PAC indicates a more stable clustering solution.
Examples
data <- mtcars
cc_res <- RunCC(data)
pac_values <- CalPAC(cc_res)
pac_values