fitMeasures | R Documentation |
This function computes a variety of fit measures to assess the global fit of a latent variable model.
fitMeasures(object, fit.measures = "all",
baseline.model = NULL, h1.model = NULL,
fm.args = list(standard.test = "default",
scaled.test = "default",
rmsea.ci.level = 0.90,
rmsea.close.h0 = 0.05,
rmsea.notclose.h0 = 0.08,
robust = TRUE,
cat.check.pd = TRUE),
output = "vector", ...)
fitmeasures(object, fit.measures = "all",
baseline.model = NULL, h1.model = NULL,
fm.args = list(standard.test = "default",
scaled.test = "default",
rmsea.ci.level = 0.90,
rmsea.close.h0 = 0.05,
rmsea.notclose.h0 = 0.08,
robust = TRUE,
cat.check.pd = TRUE),
output = "vector", ...)
object |
An object of class |
fit.measures |
If |
baseline.model |
If not NULL, an object of class
|
h1.model |
If not NULL, an object of class |
fm.args |
List. Additional options for certain fit measures. The
|
output |
Character. If |
... |
Further arguments passed to or from other methods. Not currently
used for |
A named numeric vector of fit measures.
HS.model <- ' visual =~ x1 + x2 + x3
textual =~ x4 + x5 + x6
speed =~ x7 + x8 + x9 '
fit <- cfa(HS.model, data = HolzingerSwineford1939)
fitMeasures(fit)
fitMeasures(fit, "cfi")
fitMeasures(fit, c("chisq", "df", "pvalue", "cfi", "rmsea"))
fitMeasures(fit, c("chisq", "df", "pvalue", "cfi", "rmsea"),
output = "matrix")
fitMeasures(fit, c("chisq", "df", "pvalue", "cfi", "rmsea"),
output = "text")
## fit a more restricted model
fit0 <- cfa(HS.model, data = HolzingerSwineford1939, orthogonal = TRUE)
## Calculate RMSEA_D (Savalei et al., 2023)
## See https://psycnet.apa.org/doi/10.1037/met0000537
fitMeasures(fit0, "rmsea", h1.model = fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.