Multiple Linear Regression (MLR) Example - 01-1 Single Outcome

Multiple Linear Regression (MLR) Example - 01-1 Single Outcome

Ben Kite and Chong Xing

Center for Research Methods and Data Analysis, University of Kansas

Tags: Linear Regression, Multiple Predictors, Single Outcome, Mplus

2019-01-30

Abstract: This guide outlines how to fit a linear regression model using Mplus. The results of the linear model (seven predictors and one outcome) fitted with Mplus can be compared to the same model fitted with lavaan (see Multiple Linear Regression Example in lavaan - 01).

Table of Contents

1 TITLE Command

This example is for multiple linear regression conducted in Mplus.

TITLE:
  Example 4 - Multiple Linear Regression - 01-1 Single Outcome

2 DATA Command

Nothing changes with the data importation.

DATA:
  FILE IS "../../data/job_placement.csv";

3 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
  wjspl edlevel newschl suspend expelled haveld female age;

  MISSING ARE all(99999);

4 MODEL Command

The only thing that is new in this example is in the MODEL command. Here the MLR model is specified with a single line. The ON command tells Mplus to regress the variable(s) on the right side onto the variable(s) on the left side. In this model there are seven variables used as predictors of wjspl.

MODEL:
  wjspl ON edlevel newschl suspend expelled haveld female age;

5 Run the Model

mplus reg-01-1.inp
Mplus VERSION 8.2 (Linux)
MUTHEN & MUTHEN

Running input file 'reg-01-1.inp'...

Beginning Time:  13:54:29
   Ending Time:  13:54:29
  Elapsed Time:  00:00:00

Refer to 'reg-01-1.out' for warning(s).

6 Review the Results

Click reg-01-1.out to see the output.

Last Updated 2019-01-30 Wed 13:54. Created by Emacs 25.1.1 (Org mode 9.1.13)