2.3 CFA using Mplus

This section demonstrates how to estimate a confirmatory factor model using Mplus. Because the subsection covering Amos revealed that the single common factor model was a poor fit to the data, this section will begin with the two factor model.

To launch Mplus from any Windows machine in the UITS Student Technology Centers, go to Start → All Programs → Statistical Software → Mplus → Mplus Editor. This will open Mplus and display the program’s built-in syntax editor.


Unlike Amos and LISREL, Mplus does not allow you to simply draw a path diagram and estimate the model; you must write the syntax yourself (the Language Generator under the Mplus menu, however, can make this task a little easier). Additionally, Mplus cannot directly read a file saved in SPSS format. Instead the data must be saved as a free or fixed format ASCII file. Nonetheless, Mplus is an extremely powerful program for estimating a much wider range of models than is possible with Amos and LISREL, and this example will only scratch the surface of what Mplus can do.

To convert the SPSS file values.sav into tab delimited format, open SPSS and load the file. Open the syntax editor in SPSS by going to File → New → Syntax. In the editor, type the following:

SAVE TRANSLATE OUTFILE='c:\temp\CFA\values.dat'
/TYPE=TAB /MAP /REPLACE.

This will create a new ASCII file in the C:\temp\CFA folder that contains only values of observations without variable names. The first six rows of the file values.dat look like the following:

The first model to be examined consists of two common factors and the six observed indicators of economic and moral values. The Mplus syntax for estimating this model is the following:

TITLE:           Two Factor Model;
DATA            FILE IS values.dat;
VARIABLE:   NAMES ARE privtown govtresp compete
                    homosex abortion euthanas;
MODEL:       economic BY privtown govtresp compete;
                    morals BY homosex abortion euthanas;
OUTPUT:      standardized;
                    modindices;

The TITLE statement provides a label for the particular analysis that will be run. The DATA statement specifies where the data file is located at. Absolute pathnames are only necessary if the syntax file is located in a directory different from where the data is saved. The VARIABLE statement provides names for the six observed variables in the raw data file in the order in which they appear. The MODEL statement specifies the particular model to be estimated. In this case ECONOMIC is assumed to cause the three observed variables PRIVTOWN, GOVTRESP, and COMPETE; and MORALS is assumed to cause HOMOSEX, ABORTION, and EUTHANAS. The OUTPUT statement requests that standardized parameter estimates and modification indices be included in the output file.

There are a few things to keep in mind when creating Mplus syntax. First, all commands end with a semicolon; omitting the semicolon will lead to error messages. Second, Mplus cannot read more than 80 characters in a line. One way to limit this problem is to use very short names for variables, such as x1, x2, y1, y2 (longer names are used here to be consistent with the Amos and LISREL examples above). Commands can take up more than one line, as the semicolon marks the command end. Finally, Mplus is not case sensitive; capital and lowercase letters can be used interchangeably.

It is also important to know that the default behavior for setting the scale of the common latent variable is to constrain the loading for the first variable (in this case PRIVTOWN and HOMOSEX) to one. This option can be overridden but will not be altered here to keep the example consistent with the Amos and LISREL examples above.

After entering the syntax and saving it as an Mplus input (.inp) file, estimate the model by clicking the Run button . This produces a text output (.out) file stored in the working directory with the results. For this model, the output file looks like the following:

The overall model fit is not great, with a χ2 statistic of 35.329 (df=8) large enough to reject the null of a good fit. In addition, the RMSEA is .054, which is higher than the cut-off value of .05 chosen to indicate a good fit.

Under the Model Results heading, the unstandardized loadings appear along with standard errors, the ratio of the estimates to their standard errors, and two standardized estimates. The Est./S.E. column can be used to evaluate significance. If the absolute value of the number in this column is greater than 1.96 the estimate can be interpreted as significant at the .05 level. In this case all of the unconstrained loading estimates are significant. The column StdYX is equivalent to the standardized estimates provided by Amos and LISREL. The standardized loadings are of moderate to strong magnitude. The smallest standardized estimate corresponds to the GOVTRESP variable and is .148. The remaining estimates for the standardized regression weights range from .592 (PRIVTOWN) to .792 (ABORTION). Finally, the output reports R2 statistics describing the amount of variance accounted for by the respective factor. When there is only a single path from a factor to an observed variable, these are equivalent to the standardized loadings squared. GOVTRESP has the lowest R2 with .022. The remaining variables have R2 values that range from .351 (PRIVTOWN) to .627 (ABORTION).

While the loadings are statistically significant, there remain some problems with the model. The omnibus tests suggested that the model does not adequately fit the data. Also, the low R2 for GOVTRESP suggests that the variable may not really be tapping the same economic values dimension as PRIVTOWN and COMPETE. Perhaps an alternative model would be more appropriate.

For hints at what such a model may be, examine the modification indices reported in the output. Mplus makes two suggestions: 1) add a covariance between the HOMOSEX and GOVTRESP variables, and 2) add a path from the MORALS latent variable to the GOVTRESP variable. Both of these suggest that the GOVTRESP item has something in common with the morality dimension, either by sharing measurement error with the HOMOSEX variable or as a direct indicator of the latent morality dimension. Because the standardized loading of GOVTRESP on ECONOMIC was low, it is possible that the item is actually tapping a different values dimension. Thus the second suggestion makes theoretical sense and will be estimated.

Enter the following syntax in the editor and save the input file.

TITLE:           Second Two Factor Model;
DATA            FILE IS values.dat;
VARIABLE:   NAMES ARE privtown govtresp compete
                    homosex abortion euthanas;
MODEL:       economic BY privtown govtresp compete;
                    morals BY homosex abortion euthanas govtresp;
OUTPUT:      standardized;

The output is the following:


The overall model fit appears quite good. The χ2 test yields a value of 7.934 (df=7), which has a corresponding p-value of .3383. This p-value is too high to reject the null of a good fit. The RMSEA is .011, sufficiently low to indicate acceptable fit.

The GOVTRESP variable has relatively low standardized loadings on each common factor (.150 for ECONOMIC and .176 for MORALS), suggesting that it is a weak indicator of both economic and moral values. However, the other indicators have moderate to strong standardized loadings. For PRIVTOWN the loading is .614, for COMPETE it is .681, for HOMOSEX it is .638, for ABORTION it is .785, and for EUTHANAS it is .666. The squared multiple correlations provide information on how much variance the factors account for in the observed variables. Despite receiving a path from both latent variables, GOVTRESP has a low R2 of only .053. The remaining R2 statistics are, in order of increasing magnitude, PRIVTOWN (.377), HOMOSEX (.408), EUTHANAS (.443), COMPETE (.464), and ABORTION (.617). Finally, the correlation between the two common factors is a very small -.011, and the covariance estimate of -.030 is not statistically distinguishable from zero.

The conclusion from this analysis is that two nearly orthogonal dimensions underlie the economic and moral values of American citizens. Additionally, it is unclear whether the GOVTRESP item is tapping either dimension. Future surveys should incorporate more reliable measures of economic values.


Up: CFA using LISREL
Next: Summary