| loading_stability | R Documentation |
Experimental. Bootstraps the item weights of a
build_mcml_pc fit: rows of the raw data are resampled,
the node-level network is re-estimated each time, and the
connectivity-based composite weights are recomputed. Wide intervals
mean the weighting (and therefore the "loadings" macro
network) should not be over-interpreted.
loading_stability(x, iter = 200L, ci_level = 0.05, seed = NULL)
x |
An |
iter |
Integer. Bootstrap replicates (default 200; node-level re-estimation makes this heavier than a plain bootstrap). |
ci_level |
Numeric. Significance level for percentile CIs (default 0.05). |
seed |
Integer or NULL. RNG seed. |
An object of class "pc_loading_stability": a list with
summary (tidy data frame: node, cluster,
weight, boot_mean, boot_sd, ci_lower,
ci_upper, sign_flips - the proportion of replicates
in which the item's sign differed from the observed one),
boot_weights (iter x n_nodes matrix), iter, and
ci_level. Has print and plot methods.
set.seed(1)
df <- as.data.frame(matrix(rnorm(600), 100, 6))
names(df) <- c("a1", "a2", "a3", "b1", "b2", "b3")
cl <- list(A = c("a1", "a2", "a3"), B = c("b1", "b2", "b3"))
fit <- build_mcml_pc(df, cl, aggregation = "loadings",
method = "cor")
ls <- loading_stability(fit, iter = 50, seed = 1)
ls$summary
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.