Mon - Fri : 08:00 AM - 5:00 PM
734.544-8038

Confirmatory Factor Analysis Using Mplus

Confirmatory Factor Analysis Using Mplus

///
Comment0

This example shows how to estimate a confirmatory factor model and, on the next page, a full structual equation model (SEM) using Mplus. A description of the model can be found here, and the data can be downloaded from here. See the tutorial on preparing data for Mplus for more information on converting an SPSS file into a format that Mplus will understand. Estimation was done using the free demo version of Mplus, which can be downloaded from the Mplus website.

After launching Mplus, the Mplus editor displays. The model treats intelligence as a latent variable which can be measured on the basis of test scores in four areas: reading, writing, math, and analysis. This model can be estimated by entering the following syntax in the editor:

TITLE:      CFA;
DATA:       FILE IS sem_data.dat;
VARIABLE:   NAMES ARE reading writing math analytic
            simpsons famguy amerdad;
            USEVARIABLES ARE reading writing math analytic;
MODEL:      intell BY reading writing math analytic;
OUTPUT:     standardized;

The first statement gives the model a title, and the DATA statement points to the location of the data file. If the input file is saved to the same directory as the data file, then it is only necessary to enter the data file name. The next line, VARIABLE, defines the names of the variables in the data. The USEVARIABLES option specifies which variables in the file will be used. The MODEL statement then defines the model. In this case, there will be a latent variable named intell which is measured BY the four observed test score variables. Had there been a second factor, an additional line would have been added to name the latent variable and define the respective observed variables. The final OUTPUT statement is optional and used to request additional information in the output file. In this case, standardized estimates are requested.

By default, Mplus identifies measurement models by constraining the first factor loading (here, the loading for reading) to equal one. This assumption can be relaxed. For example, the metric of the latent variable can instead be set to one (and all factor loadings let free) by adding an asterisk after the first variable and adding a line appending @1 to the latent variable name. That is, the MODEL statement would instead become:

MODEL:      intell BY reading* writing math analytic;
            [email protected];

After specifying the syntax, save the input file in the same directory as the data and click RUN. This writes an output file (.out extension) to the same directory. The output correspnding to this example is the following:

Mplus VERSION 5.21 DEMO
MUTHEN & MUTHEN
02/17/2010   2:31 PM

INPUT INSTRUCTIONS

  TITLE:      CFA;
  DATA:       FILE IS sem_data.dat;
  VARIABLE:   NAMES ARE reading writing math analytic
              simpsons famguy amerdad;
              USEVARIABLES ARE reading writing math analytic;
  MODEL:      intell BY reading writing math analytic;
  OUTPUT:     standardized;


INPUT READING TERMINATED NORMALLY

CFA;

SUMMARY OF ANALYSIS

Number of groups                                                 1
Number of observations                                         100

Number of dependent variables                                    4
Number of independent variables                                  0
Number of continuous latent variables                            1

Observed dependent variables

  Continuous
   READING     WRITING     MATH        ANALYTIC

Continuous latent variables
   INTELL


Estimator                                                       ML
Information matrix                                        OBSERVED
Maximum number of iterations                                  1000
Convergence criterion                                    0.500D-04
Maximum number of steepest descent iterations                   20

Input data file(s)
  sem_data.dat

Input data format  FREE


THE MODEL ESTIMATION TERMINATED NORMALLY


TESTS OF MODEL FIT

Chi-Square Test of Model Fit

          Value                              3.533
          Degrees of Freedom                     2
          P-Value                           0.1710

Chi-Square Test of Model Fit for the Baseline Model

          Value                            358.864
          Degrees of Freedom                     6
          P-Value                           0.0000

CFI/TLI

          CFI                                0.996
          TLI                                0.987

Loglikelihood

          H0 Value                        -387.042
          H1 Value                        -385.275

Information Criteria

          Number of Free Parameters             12
          Akaike (AIC)                     798.083
          Bayesian (BIC)                   829.345
          Sample-Size Adjusted BIC         791.446
            (n* = (n + 2) / 24)

RMSEA (Root Mean Square Error Of Approximation)

          Estimate                           0.088
          90 Percent C.I.                    0.000  0.235
          Probability RMSEA <= .05           0.245

SRMR (Standardized Root Mean Square Residual)

          Value                              0.010



MODEL RESULTS

                                                    Two-Tailed
                    Estimate       S.E.  Est./S.E.    P-Value

 INTELL   BY
    READING            1.000      0.000    999.000    999.000
    WRITING            0.895      0.070     12.815      0.000
    MATH               0.962      0.070     13.660      0.000
    ANALYTIC           0.913      0.070     12.997      0.000

 Intercepts
    READING           -0.111      0.105     -1.058      0.290
    WRITING           -0.070      0.096     -0.726      0.468
    MATH              -0.047      0.099     -0.472      0.637
    ANALYTIC          -0.126      0.097     -1.301      0.193

 Variances
    INTELL             0.885      0.156      5.665      0.000

 Residual Variances
    READING            0.221      0.043      5.097      0.000
    WRITING            0.214      0.039      5.493      0.000
    MATH               0.167      0.036      4.700      0.000
    ANALYTIC           0.203      0.038      5.352      0.000


STANDARDIZED MODEL RESULTS


STDYX Standardization

                                                    Two-Tailed
                    Estimate       S.E.  Est./S.E.    P-Value

 INTELL   BY
    READING            0.894      0.025     35.602      0.000
    WRITING            0.876      0.028     31.535      0.000
    MATH               0.911      0.023     40.497      0.000
    ANALYTIC           0.886      0.026     33.802      0.000

 Intercepts
    READING           -0.106      0.100     -1.055      0.291
    WRITING           -0.073      0.100     -0.725      0.469
    MATH              -0.047      0.100     -0.472      0.637
    ANALYTIC          -0.130      0.100     -1.295      0.195

 Variances
    INTELL             1.000      0.000    999.000    999.000

 Residual Variances
    READING            0.200      0.045      4.451      0.000
    WRITING            0.232      0.049      4.776      0.000
    MATH               0.170      0.041      4.135      0.000
    ANALYTIC           0.216      0.046      4.648      0.000


STDY Standardization

                                                    Two-Tailed
                    Estimate       S.E.  Est./S.E.    P-Value

 INTELL   BY
    READING            0.894      0.025     35.602      0.000
    WRITING            0.876      0.028     31.535      0.000
    MATH               0.911      0.023     40.497      0.000
    ANALYTIC           0.886      0.026     33.802      0.000

 Intercepts
    READING           -0.106      0.100     -1.055      0.291
    WRITING           -0.073      0.100     -0.725      0.469
    MATH              -0.047      0.100     -0.472      0.637
    ANALYTIC          -0.130      0.100     -1.295      0.195

 Variances
    INTELL             1.000      0.000    999.000    999.000

 Residual Variances
    READING            0.200      0.045      4.451      0.000
    WRITING            0.232      0.049      4.776      0.000
    MATH               0.170      0.041      4.135      0.000
    ANALYTIC           0.216      0.046      4.648      0.000


STD Standardization

                                                    Two-Tailed
                    Estimate       S.E.  Est./S.E.    P-Value

 INTELL   BY
    READING            0.941      0.083     11.331      0.000
    WRITING            0.841      0.077     10.956      0.000
    MATH               0.905      0.077     11.700      0.000
    ANALYTIC           0.858      0.077     11.158      0.000

 Intercepts
    READING           -0.111      0.105     -1.058      0.290
    WRITING           -0.070      0.096     -0.726      0.468
    MATH              -0.047      0.099     -0.472      0.637
    ANALYTIC          -0.126      0.097     -1.301      0.193

 Variances
    INTELL             1.000      0.000    999.000    999.000

 Residual Variances
    READING            0.221      0.043      5.097      0.000
    WRITING            0.214      0.039      5.493      0.000
    MATH               0.167      0.036      4.700      0.000
    ANALYTIC           0.203      0.038      5.352      0.000


R-SQUARE

    Observed                                        Two-Tailed
    Variable        Estimate       S.E.  Est./S.E.    P-Value

    READING            0.800      0.045     17.801      0.000
    WRITING            0.768      0.049     15.768      0.000
    MATH               0.830      0.041     20.249      0.000
    ANALYTIC           0.784      0.046     16.901      0.000


QUALITY OF NUMERICAL RESULTS

     Condition Number for the Information Matrix              0.293E-01
       (ratio of smallest to largest eigenvalue)


     Beginning Time:  14:31:12
        Ending Time:  14:31:12
       Elapsed Time:  00:00:00


Mplus VERSION 5.21 DEMO has the following limitations:
  Maximum number of dependent variables: 6
  Maximum number of independent variables: 2
  Maximum number of between variables: 2


MUTHEN & MUTHEN
3463 Stoner Ave.
Los Angeles, CA  90066

Tel: (310) 391-9971
Fax: (310) 391-8971
Web: www.StatModel.com
Support: [email protected]

Copyright (c) 1998-2009 Muthen & Muthen

The results are similar to those produced by other programs. The one difference is that Mplus also estimates intercepts (equivalent to the sample means of the observed variables). This does not affect the slope estimates or model fit, however, which are of greater theoretical interest.

An example of estimating a full structural equation model using Mplus can be found on the next page.

Still have questions? Contact us!