SEM Structural Models in Mplus - Example 2

SEM Structural Models in Mplus - Example 2

Ben Kite and Chong Xing

Center for Research Methods and Data Analysis, University of Kansas

Tags: Structural Equation Modeling, Mplus

2019-02-04

Abstract: This guide outlines how to fit a structural equation model with measurement and structural components. In this example, both the predictor and the outcome variables are latent factors. The model results can be compared to the same model fitted with lavaan (see SEM Structural Models in R - Example 2).

Table of Contents

1 The lavaan Example

2 TITLE Command

TITLE:
  Example 5 - Structural Equation Model 2

3 DATA Command

In this example a ".dat" file being used. It is the same as using a ".csv" file.

DATA:
  FILE IS "../../data/insomnia.dat";

4 VARIABLE Command

VARIABLE:
  names are insom1-insom7 cesd1-cesd20 phy psy soc env;
  usevariables are insom1-insom7 phy psy soc env;
  missing all (999);

5 MODEL Command

Here the first four lines are used to set up the measurement of the four latent variables. For each latent variable the first indicator variable to the right of the "BY" statement has a factor loading set to 1 (the Mplus default). The last line sets up the regression component of the model. Notice that the latent variable covariance is not specified, Mplus will provide that automatically.

MODEL:
!A three-indicator measurement model for Impact;
  Impact BY insom5* insom6 insom7;
  Impact@1.0;

!A three-indicator measuremenrt model for Severity;
  Severity BY insom1* insom2 insom3;
  Severity@1.0;

!A three-indicator measurement model for Satisf;
  Satisf BY insom4* insom1 insom7;
  Satisf@1.0;

!A four-indicator measurement model for Qol;
  Qol BY phy* psy soc env;
  Qol@1.0;

!The structural paths of the model;
!Regressing Qol onto Impact Severity and Stisf;
  Qol ON Impact Severity Satisf;

6 OUTPUT Command

As always, additional output can be requested.

OUTPUT:
  SAMPSTAT; 
  TECH1;
  STDYX;

7 Run the Model

mplus8 sem-02.inp
Mplus VERSION 8 (Linux)
MUTHEN & MUTHEN

Running input file 'sem-02.inp'...

Beginning Time:  10:19:43
   Ending Time:  10:19:43
  Elapsed Time:  00:00:00

Output saved in 'sem-02.out'.

8 Review the Results

Click sem-02.out to see the output.

Last Updated 2019-02-04 Mon 10:19. Created by Emacs 25.1.1 (Org mode 9.1.13)