fitMeasures: Fit Measures for a Latent Variable Model

Description Usage Arguments Value Examples

Description

This function computes a variety of fit measures to assess the global fit of a latent variable model.

Usage

1
2
fitMeasures(object, fit.measures = "all", baseline.model = NULL)
fitmeasures(object, fit.measures = "all", baseline.model = NULL)

Arguments

object

An object of class lavaan.

fit.measures

If "all", all fit measures available will be returned. If only a single or a few fit measures are specified by name, only those are computed and returned.

baseline.model

If not NULL, an object of class lavaan, representing a user-specified baseline model. If a baseline model is provided, all fit indices relying on a baseline model (eg. CFI or TLI) will use the test statistics from this user-specified baseline model, instead of the default baseline model.

Value

A named numeric vector of fit measures.

Examples

1
2
3
4
5
6
7
8
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"))

nietsnel/psindex documentation built on June 22, 2019, 10:56 p.m.