imxWlsChiSquare: Calculate Chi Square for a WLS Model

View source: R/MxFitFunctionWLS.R

imxWlsChiSquareR Documentation

Calculate Chi Square for a WLS Model

Description

This is an internal function used to calculate the Chi Square distributed fit statistic for weighted least squares models.

Usage

imxWlsChiSquare(model, J=NA)

Arguments

model

An MxModel object with acov (WLS) data

J

Optional pre-computed Jacobian matrix

Details

The Chi Square fit statistic for models fit with maximum likelihood depends on the difference in model fit in minus two log likelihood units between the saturated model and the more restricted model under investigation. For models fit with weighted least squares a different expression is required. If J is the first derivative (Jacobian) of the mapping from the free parameters to the unique elements of the expected covariance, means, and threholds, J_c is the orthogonal complement of J, W is the inverse of the full weight matrix, and e is the difference between the sample-estimated and model-implied covariance, means, and thresholds, then the Chi Square fit statistic is

\chi^2 = e' J_c (J'_c W J_c)^-1 J'_c e

with e' indicating the transpose of e. This Equation 2.20a from Browne (1984) where he showed that this statistic is chi-square distributed with the conventional degrees of freedom.

Mean and variance adjusted Chi Square statistics are also computed following Asparouhov and Muthen (2006).

Value

A named list with components

Chi

numeric value of the Chi Square fit statistic.

ChiDoF

degrees of freedom for the Chi Square fit statistic.

ChiM

numeric value of the mean adjusted Chi Square fit statistic

ChiMV

numeric value of the mean and variance adjusted Chi Square fit statistic

mAdjust

numeric value of the mean adjustment

mvAdjust

numeric value of the mean and variance adjustment

dstar

adjusted degrees of freedom for the mean and variance adjusted Chi Square fit statistic

References

M. W. Browne. (1984). Asymptotically Distribution-Free Methods for the Analysis of Covariance Structures. British Journal of Mathematical and Statistical Psychology, 37, 62-83.

T. Asparouhov and B. O. Muthen. (2006). Robust Chi Square Difference Testing with Mean and Variance Adjusted Test Statistics. Mplus Web Notes: No. 10.


OpenMx documentation built on Oct. 19, 2024, 9:06 a.m.