The second rudimentary model command in Mplus is ON or regress. This is similar to correlation but now you are inferring direction (i.e., single-headed arrow).
TITLE: Simple Regression Analysis; DATA: File is example.dat; VARIABLE: Names are VARx VARy; Missing are all(-999); Usevariables = VARx VARy; ANALYSIS: Estimator = ML; MODEL: VARy on VARx; !VARx is predicting VARy OUTPUT: Standardized sampstat;
Now the language used here can be a bit tricky, as Mplus uses traditional regression speak. But just try to remember that it’s backwards to the intuitive understanding: VARy on VARx means VARy is being regressed on our predictor VARx or VARx is predicting VARy.
If you’re anything like me, that takes a little while to warm up to, but it will happen. As you’re learning, I would recommend you always make notes after each line of command to remind yourself what your testing (like I did above), regression or otherwise, it’s good practice.
Now let’s look at an example of a simple regression using real data:
In this example we have political knowledge (i.e., an employee’s collection of strategic and potentially sensitive information about his or her supervisor) predicting change-oriented organizational citizenship behaviour (i.e., an individual’s extra-role behaviour enacted to bring around change in the workplace). The idea here is that an individual’s knowledge about their supervisor will enable them to bring around change.
And here is the output created from running this syntax:
Mplus VERSION 7.4 (Mac) MUTHEN & MUTHEN 04/30/2017 7:57 PM INPUT INSTRUCTIONS TITLE: Simple Regression Analysis; DATA: File is PK4regression.dat; VARIABLE: Names are PK PW PS PT CHOCB LMX; Missing are all(-999); Usevariables = PK CHOCB; ANALYSIS: Estimator = ML; MODEL: CHOCB on PK; !PK is predicting CHOCB OUTPUT: Standardized sampstat; *** WARNING Data set contains cases with missing on all variables. These cases were not included in the analysis. Number of cases with missing on all variables: 1 *** WARNING Data set contains cases with missing on x-variables. These cases were not included in the analysis. Number of cases with missing on x-variables: 1 2 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS Simple Regression Analysis; SUMMARY OF ANALYSIS Number of groups 1 Number of observations 493 Number of dependent variables 1 Number of independent variables 1 Number of continuous latent variables 0 Observed dependent variables Continuous CHOCB Observed independent variables PK Estimator ML Information matrix OBSERVED Maximum number of iterations 1000 Convergence criterion 0.500D-04 Maximum number of steepest descent iterations 20 Maximum number of iterations for H1 2000 Convergence criterion for H1 0.100D-03 Input data file(s) PK4regression.dat Input data format FREE SUMMARY OF DATA Number of missing data patterns 1 COVARIANCE COVERAGE OF DATA Minimum covariance coverage value 0.100 PROPORTION OF DATA PRESENT Covariance Coverage CHOCB PK ________ ________ CHOCB 1.000 PK 1.000 1.000 SAMPLE STATISTICS ESTIMATED SAMPLE STATISTICS Means CHOCB PK ________ ________ 1 3.640 3.458 Covariances CHOCB PK ________ ________ CHOCB 0.585 PK 0.238 0.547 Correlations CHOCB PK ________ ________ CHOCB 1.000 PK 0.421 1.000 MAXIMUM LOG-LIKELIHOOD VALUE FOR THE UNRESTRICTED (H1) MODEL IS -1070.188 UNIVARIATE SAMPLE STATISTICS UNIVARIATE HIGHER-ORDER MOMENT DESCRIPTIVE STATISTICS Variable/ Mean/ Skewness/ Minimum/ % with Percentiles Sample Size Variance Kurtosis Maximum Min/Max 20%/60% 40%/80% Median CHOCB 3.640 -0.581 1.000 0.41% 3.000 3.500 3.750 493.000 0.585 0.443 5.000 5.48% 4.000 4.250 PK 3.458 -0.433 1.040 0.20% 2.870 3.350 3.520 493.000 0.547 0.200 5.000 1.01% 3.700 4.090 THE MODEL ESTIMATION TERMINATED NORMALLY MODEL FIT INFORMATION Number of Free Parameters 3 Loglikelihood H0 Value -519.526 H1 Value -519.526 Information Criteria Akaike (AIC) 1045.053 Bayesian (BIC) 1057.654 Sample-Size Adjusted BIC 1048.132 (n* = (n + 2) / 24) Chi-Square Test of Model Fit Value 0.000 Degrees of Freedom 0 P-Value 0.0000 RMSEA (Root Mean Square Error Of Approximation) Estimate 0.000 90 Percent C.I. 0.000 0.000 Probability RMSEA <= .05 0.000 CFI/TLI CFI 1.000 TLI 1.000 Chi-Square Test of Model Fit for the Baseline Model Value 96.004 Degrees of Freedom 1 P-Value 0.0000 SRMR (Standardized Root Mean Square Residual) Value 0.000 MODEL RESULTS Two-Tailed Estimate S.E. Est./S.E. P-Value CHOCB ON PK 0.435 0.042 10.295 0.000 Intercepts CHOCB 2.134 0.150 14.276 0.000 Residual Variances CHOCB 0.482 0.031 15.700 0.000 STANDARDIZED MODEL RESULTS STDYX Standardization Two-Tailed Estimate S.E. Est./S.E. P-Value CHOCB ON PK 0.421 0.037 11.348 0.000 Intercepts CHOCB 2.790 0.254 10.992 0.000 Residual Variances CHOCB 0.823 0.031 26.392 0.000 STDY Standardization Two-Tailed Estimate S.E. Est./S.E. P-Value CHOCB ON PK 0.569 0.048 11.859 0.000 Intercepts CHOCB 2.790 0.254 10.992 0.000 Residual Variances CHOCB 0.823 0.031 26.392 0.000 STD Standardization Two-Tailed Estimate S.E. Est./S.E. P-Value CHOCB ON PK 0.435 0.042 10.295 0.000 Intercepts CHOCB 2.134 0.150 14.276 0.000 Residual Variances CHOCB 0.482 0.031 15.700 0.000 R-SQUARE Observed Two-Tailed Variable Estimate S.E. Est./S.E. P-Value CHOCB 0.177 0.031 5.674 0.000 QUALITY OF NUMERICAL RESULTS Condition Number for the Information Matrix 0.337E-02 (ratio of smallest to largest eigenvalue) Beginning Time: 19:57:50 Ending Time: 19:57:50 Elapsed Time: 00:00:00 MUTHEN & MUTHEN 3463 Stoner Ave. Los Angeles, CA 90066 Tel: (310) 391-9971 Fax: (310) 391-8971 Web: www.StatModel.com Support: Support@StatModel.com Copyright (c) 1998-2015 Muthen & Muthen
Looking under the section STANDARDIZED MODEL RESULTS we can see that political knowledge predicting change-oriented organizational citizenship behaviour produces a standardized beta weight of .42, p < .001. Looking under R-SQUARE we can see that PK accounts for close to 18% of the variance in predicting CHOCB (R² = .18 [rounded up]). Although there is directionality inferred in regression analysis, study design determines whether causality can be inferred — and in this case it cannot because the study was a self-report survey which measured both variables.
Now, you would very rarily run just a single simple regression, but I wanted to keep it simple for show. If you wanted to run a multiple regression, you would just add more predictor variables on the right-hand side of the ON model command. Simple as that!