SEM Structural Models in Mplus - Example 1

SEM Structural Models in Mplus - Example 1
Tags: Structural Equation Modeling, Mplus

2019-01-30
Abstract: This guide outlines how to fit a structural equation model with measurement and structural components. In other words, a model where latent variables are measured and then used in a regression model. The model results can be compared to the same model fitted with lavaan (see SEM Structural Models in R - Example 1)
Table of Contents
1 The lavaan Example
2 TITLE Command
This is an example of a structural equation model with latent variables being evaluated an dependent variables in regression.
TITLE: Example 5 - Structural Equation Model 1
3 DATA Command
DATA: FILE IS "../../data/job_placement.csv";
4 VARIABLE Command
The data are imported the same way as before, but notice the change under the "USEVARIABLES ARE" statement.
VARIABLE: NAMES ARE id wjcalc wjspl wratspl wratcalc waiscalc waisspl edlevel newschl suspend expelled haveld female age; USEVARIABLES ARE wratcalc wjcalc waiscalc wratspl wjspl waisspl edlevel newschl suspend expelled haveld female age; MISSING ARE all(99999);
5 MODEL Command
Here is an example of a SEM with measurement (CFA) and prediction (MLR) components combined. The first three lines set up the measurement of the MATH and SPELL latent variables. The remaining lines build the structural portion of the model in which each latent variable is predicted by seven observed variables and the latent variables are allowed to correlate (this is done by the WITH statement).
MODEL: MATH BY wratcalc* wjcalc waiscalc; MATH@1.0; SPELL BY wratspl* wjspl waisspl; SPELL@1.0; MATH ON edlevel newschl suspend expelled haveld female age; SPELL ON edlevel newschl suspend expelled haveld female age; MATH WITH SPELL;
6 OUTPUT Command
As always, additional output can be requested.
OUTPUT: SAMPSTAT; TECH1; STDYX;
7 Run the Model
mplus sem-01.inp
Mplus VERSION 8.2 (Linux) MUTHEN & MUTHEN Running input file 'sem-01.inp'... Beginning Time: 15:27:53 Ending Time: 15:27:53 Elapsed Time: 00:00:00 Refer to 'sem-01.out' for warning(s).
8 Review the Results
Click sem-01.out to see the output.