
Diagnose PCA Axes with User-defined Trait Modules
Source:R/regime-integration.R
regime_module_diagnostics.RdSummarize within- and between-module correlations for each post-hoc regime and correlate those module summaries with regime correlation PCA scores.
Arguments
- pca
A
regime_correlation_pcaobject fromregime_correlation_pca()computed withuse_correlation = TRUE.- modules
Named list of character vectors. Module names must be unique and not blank. Each element names the unique trait labels belonging to one anatomical, developmental, or functional module. Singleton modules are allowed; their within-module scores and PC correlations are
NAbecause no pairwise correlation is defined.- comparisons
Optional named list defining module comparisons to score. Each element must be a length-two character vector naming entries in
modules. When both names are the same, the score is the mean upper-triangle within-module correlation; otherwise it is the mean between-module correlation. IfNULL, all within-module and pairwise between-module comparisons are generated. Missing or blank comparison names are generated from their module pairs; the resulting names must be unique and not blank.- pcs
Principal components to correlate with module summaries. Supply numeric indices or names such as
"PC1". Defaults to all PCA score columns.