Description Usage Arguments Value Examples
This function returns a data frame that contains the fit indices for a SEM or CFA model. The type of indices can be chosen (available are all indices that can be obtained using the function inspect
). Reliability indices (alpha, omega, average variance extracted) can added if desired (will be computed by using the function reliability
).
1 2 3 4 5 6 7 8 9 |
object |
An object of class |
indices |
Vector of the indices that should be in the ouput. |
rmsea_ci |
Logical vector indicating whether the confidence intervals of the RMSEA should be included (important for reporting the fit in an RMarkdown document using |
reliability |
Logical value indicating whether Cronbach's alpha, McDonald's omega (composite reliability), and the average variance extracted should be included. |
robust |
Logical value indicating whether the model was fitted with a robust estimator. If yes, scaled indices will be used. |
print |
Logical value indicating whether the table should be formatted according to APA guidelines. |
A data frame containing the fit indices of the model.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | library(lavaan)
model <- '
# latent variables
ind60 =~ x1 + x2 + x3
dem60 =~ y1 + y2 + y3 + y4
dem65 =~ y5 + y6 + y7 + y8
# regressions
dem60 ~ ind60
dem65 ~ ind60 + dem60
# residual covariances
y1 ~~ y5
y2 ~~ y4 + y6
y3 ~~ y7
y4 ~~ y8
y6 ~~ y8
'
fit <- sem(model,
data = PoliticalDemocracy)
# Create table of fit indices
fit_table(fit)
fit_table(fit, indices = c("cfi", "tli"))
fit_table(fit, rmsea_ci = TRUE, print = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.