View source: R/compute_edges.R
| compute_edges | R Documentation |
The centerpiece of the bass-ackwards algebra. For any engine whose scoring
is a linear map S = Z W, the cross-level correlation matrix is:
compute_edges(
levels,
R,
edge_method = c("auto", "algebra", "scores"),
pairs = c("adjacent", "all"),
data = NULL,
use = "pairwise.complete.obs",
cut_show = 0.3,
build_tidy = TRUE
)
levels |
Named list (indexed by k) of per-level objects produced by an
engine. Each must contain a |
R |
Square correlation matrix (p x p). Required for the algebra path. |
edge_method |
One of |
pairs |
|
data |
Optional data frame / matrix of raw observations. Required only
when |
use |
Passed to |
cut_show |
Edges with |
build_tidy |
Build the tidy edge data frame? |
E(a,b) = D_a^{-1/2} (W_a' R W_b) D_b^{-1/2}
where R is the input correlation matrix and D_x = diag(W_x' R W_x) are
the actual score variances (not assumed to be 1). This avoids
materialising scores while remaining exact for PCA, EFA (regression /
Bartlett / tenBerge) – all of which produce linear score maps.
When the algebra cannot be used (nonlinear scoring, missing R, or the user
forces edge_method = "scores"), scores are materialised from data instead.
A list with:
matrices |
Named list of |
tidy |
A data frame with one row per directed edge: |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.