View source: R/regime-integration.R
| regime_module_diagnostics | R Documentation |
Summarize within- and between-module correlations for each post-hoc regime and correlate those module summaries with regime correlation PCA scores.
regime_module_diagnostics(pca, modules, comparisons = NULL, pcs = NULL)
pca |
A |
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 |
comparisons |
Optional named list defining module comparisons to score.
Each element must be a length-two character vector naming entries in
|
pcs |
Principal components to correlate with module summaries. Supply
numeric indices or names such as |
An object of class regime_module_diagnostics, containing
per-regime module scores, PC/module correlations, comparison definitions,
and settings.
make_correlation <- function(r12, r13, r23) {
matrix(
c(1, r12, r13, r12, 1, r23, r13, r23, 1),
nrow = 3,
dimnames = list(c("bill", "wing", "tail"),
c("bill", "wing", "tail"))
)
}
covariances <- list(
r1 = make_correlation(0.1, 0.2, 0.3),
r2 = make_correlation(0.2, 0.1, 0.4),
r3 = make_correlation(-0.1, 0.3, 0.2),
r4 = make_correlation(0.4, -0.2, 0.1)
)
pca <- regime_correlation_pca(covariances)
modules <- list(flight = c("wing", "tail"), feeding = "bill")
diagnostics <- regime_module_diagnostics(pca, modules)
diagnostics$correlations
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.