Combine fit measures form several models and compare
Usage
lav_compare(
...,
what = c("cfi", "tli", "rmsea", "srmr", "bic", "df"),
LRT = F,
print = T
)
Examples
data("HolzingerSwineford1939", package="lavaan")
m1 = cfa("F1 =~ x1 + x2 + x3 + x4 + x5", estimator= "mlr", HolzingerSwineford1939)
m2 = cfa("F1 =~ x1 + x2 + x3 + x4 + x5; x4 ~~ x5", estimator= "mlr", HolzingerSwineford1939)
lav_compare(m1, m2, what = c("cfi.scaled", "rmsea.scaled") )
#>
#> cfi.scaled rmsea.scaled cfi.scaled rmsea.scaled
#> m1 0.743 0.242
#> m2 0.964 0.101 0.221 -0.14