Multiple Linear Regression (MLR) Example
CRMDA
Abstract:
Tags:
2018-07-11
Table of Contents
1 Title Command
This example is for multiple linear regression conducted in Mplus.
TITLE: Example 4 - Multiple Linear Regression
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 Output
mplus reg-01.inp
Mplus VERSION 8 (Linux) MUTHEN & MUTHEN Running input file 'reg-01.inp'... Beginning Time: 16:02:14 Ending Time: 16:02:14 Elapsed Time: 00:00:00 Refer to 'reg-01.out' for warning(s).
6 Review the Results
Click reg-01.out to see the output.