# \donttest{
library(dplyr)
data(NA2020)
# Fit the original model:
model <- ggm(NA2020, estimator = "FIML") %>% runmodel
# Bootstrap with pruning (parallel, 100 reps):
bootstraps <- loop_psychonetrics({
ggm(NA2020, bootstrap = "nonparametric",
estimator = "FIML") %>%
runmodel %>%
prune(alpha = 0.05)
}, reps = 100, nCores = 2)
# Aggregate and inspect:
boot_agg <- aggregate_bootstraps(
sample = model %>% prune(alpha = 0.05),
bootstraps = bootstraps
)
# View results:
parameters(boot_agg)
CIplot(boot_agg, "omega", split0 = TRUE)
# }
Run the code above in your browser using DataLab