| boot_edges | R Documentation |
Attaches nonparametric bootstrap standard errors and percentile confidence
intervals to every between-level correlation (edge) of a fitted
bass-ackwards hierarchy. Every edge ackwards() reports is a point
estimate; boot_edges() quantifies its sampling uncertainty, which matters
most where a hard threshold consumes the estimate – prune()'s
|r| >= redundancy_r redundancy rule, and the Forbes (2023) practice of
interpreting the strongest all-pairs edge.
boot_edges(x, ...)
## S3 method for class 'ackwards'
boot_edges(x, data, n_boot = 1000L, conf = 0.95, seed = NULL, ...)
x |
An |
... |
Reserved for future arguments. |
data |
The raw item data the model was fit on. Required – the
|
n_boot |
Number of bootstrap replicates. Default |
conf |
Confidence level for the percentile intervals. Default |
seed |
Integer seed for reproducible resampling. |
For each of n_boot replicates, n rows are resampled with replacement,
the correlation matrix is recomputed with the same basis and missing-data
routine used at fit time, and the full hierarchy is refit. Each replicate
level is then anchored to the full-sample solution – its factors
matched (greedy max-|r| with removal) and sign-oriented against the
full-sample factors on the full-sample correlation matrix – before its
edges are computed. Without anchoring, factor label switching and sign
flipping across replicates would corrupt the pooled edge distributions;
this is the same matching machinery comparability() uses.
All resample indices are drawn upfront from seed, so results are
reproducible and identical whether replicates run serially or in parallel.
Replicate fits are dispatched through future.apply when it is
installed and the user has set a future::plan() (serial otherwise, as in
ackwards()'s ESEM engine).
x, invisibly modified: the $boot element is populated with
edges |
Data frame with one row per edge (aligned with
|
n_boot, conf, seed |
The request. |
After calling boot_edges(), tidy(x, what = "edges") gains se,
lo, and hi columns, and print(x)/summary(x) note the interval
coverage.
Per-edge intervals make sampling uncertainty visible: an edge whose
interval straddles prune()'s redundancy_r threshold should not be
treated as decisively above or below it. They do not correct the
selection bias of scanning many edges for the strongest one – the maximum
of hundreds of correlations capitalizes on chance even when every
individual interval is honest. Treat the intervals as per-edge error bars,
not a familywise inference.
A replicate whose hierarchy fails to converge (in full or at some levels)
contributes NA to the affected edges and is dropped from their
distributions – convergence is data, not an error. The usable replicate
count is reported per edge in n_boot_ok, and a message summarises any
shortfall.
Efron, B., & Tibshirani, R. J. (1993). An introduction to the bootstrap. Chapman & Hall.
Forbes, M. K. (2023). Improving hierarchical models of individual differences: An extension of Goldberg's bass-ackward method. Psychological Methods. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1037/met0000546")}
prune() for the thresholded rules the intervals contextualise,
comparability() for split-half replicability of the factors
themselves, tidy.ackwards() for the augmented edge table.
x <- ackwards(sim16, k_max = 3)
x <- boot_edges(x, sim16, n_boot = 100, seed = 1)
x$boot$edges
head(tidy(x)) # now carries se / lo / hi
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.