View source: R/bootstrap_lavaan_comparison.R
| bootstrap_lavaan_comparison | R Documentation |
Perform bootstrap-based comparison of lavaan models
bootstrap_lavaan_comparison(
model1,
model2,
R = 1000,
parallel = "no",
ncpus = 1
)
model1 |
First lavaan model |
model2 |
Second lavaan model |
R |
Number of bootstrap replications (default: 1000) |
parallel |
Type of parallel processing (if any) |
ncpus |
Number of CPUs to use for parallel processing |
A list containing bootstrap results
library(lavaan)
model1 <- 'F1 =~ x1 + x2 + x3'
model2 <- 'F1 =~ x1 + x2 + x3 + x4'
fit1 <- cfa(model1, data = HolzingerSwineford1939)
fit2 <- cfa(model2, data = HolzingerSwineford1939)
boot_result <- bootstrap_lavaan_comparison(fit1, fit2, R = 100)
print(boot_result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.