## You are here

4 posts / 0 new
Offline
Joined: 09/05/2013 - 09:49

Dear users,

I was trying to model latent variable via the common factor model using path-centric model specification as it is shawn in the examples in OpenMx User Guide, Release 1.2.0-1919, chapter 2.2 Factor Analysis, Path Specification (http://openmx.psyc.virginia.edu/docs/OpenMx/latest/OpenMxUserGuide.pdf). My purpose was to to estimate factor loadings, residual variances and means. But in all my attmpts I did not receive the chi-square statistics and some other goodness of fit measures like CFI, TLI and RMSEA. Even in the example exactly copied from the above source (http://openmx.psyc.virginia.edu/svn/tags/stable-1.2/demo/OneFactorModel_PathRaw.R) I have not received the chi-square value. Is there any mistakes?

best regards,
Krzysiek

Offline
Joined: 07/31/2009 - 15:26
If you were using raw data,

If you were using raw data, that is mxData with type="raw", then these fit indices are not returned by default so that the model estimates faster. These fit indices require a best-fitting comparison model that we call the Saturated Model. By default, OpenMx does not fit this model for you because it often doubles the amount of run-time. The saturated model is a model with all the means and covariances freely estimated as parameters. Future versions of OpenMx will have a helper function for making this model. I've attached the R file that defines this function for you to use. Running the attached R file defines a function called mxSaturatedModel that takes a simple mxModel, builds, and optionally fits the corresponding saturated model.

The general format of use is as follows:

#  Example usage
amod <- mxModel(blah)
smod <- mxSaturatedModel(amod, run=TRUE)
summary(amod, SaturatedLikelihood=smod)

Once the SaturatedLikelihood argument is given the saturated model, the summary should return all the fit indices you mentioned. Let us know if it does not!

Offline
Joined: 07/31/2009 - 15:14
Cool

Mike H, that's very nice! I hope a multiple group version will be forthcoming :).

One thing I noted, your file defines omxSaturatedModel() not mxSaturatedModel() so a slight tweak to read

#  Example usage
amod <- mxModel(blah)
smod <- omxSaturatedModel(amod, run=TRUE)
summary(amod, SaturatedLikelihood=smod)

seems needed.

Offline
Joined: 09/05/2013 - 09:49
Thank you!

Thank you very much!
It really helps me!
Krzysiek