semTools (version 0.5-2)

chisqSmallN: k-factor correction for \(chi^2\) test statistic

Description

Calculate k-factor correction for \(chi^2\) model-fit test statistic to adjust for small sample size.

Usage

chisqSmallN(fit0, fit1 = NULL, ...)

Arguments

fit0

The lavaan model object provided after running the cfa, sem, growth, or lavaan functions.

fit1

Optional additional '>lavaan model, in which fit0 is nested. If fit0 has fewer df than fit1, the models will be swapped, still on the assumption that they are nested.

Additional arguments to the lavTestLRT function.

Value

A numeric vector including the original (unadjusted) chi-squared statistic, the k-factor correction, the corrected test statistic, the df for the test, and the p value for the test under the null hypothesis that the model fits perfectly (or that the 2 models have equivalent fit).

Details

The k-factor correction (Nevitt & Hancock, 2004) is a global fit index which can be computed by:

$$ kc = 1 - \frac{2 \times P + 4 \times K + 5}{6 \times N}$$

where \(N\) is the sample size when using normal likelihood, or \(N - 1\) when using likelihood = 'wishart'.

References

Nevitt, J., & Hancock, G. R. (2004). Evaluating small sample approaches for model test statistics in structural equation modeling. Multivariate Behavioral Research, 39(3), 439--478. doi:10.1207/S15327906MBR3903_3

Examples

Run this code
# NOT RUN {
HS.model <- '
    visual  =~ x1 + b1*x2 + x3
    textual =~ x4 + b2*x5 + x6
    speed   =~ x7 + b3*x8 + x9
'
fit1 <- cfa(HS.model, data = HolzingerSwineford1939)
## test a single model (implicitly compared to a saturated model)
chisqSmallN(fit1)

## fit a more constrained model
fit0 <- cfa(HS.model, data = HolzingerSwineford1939, orthogonal = TRUE)
## compare 2 models
chisqSmallN(fit1, fit0)

# }

Run the code above in your browser using DataLab