10.07.2015 Views

Mplus Users Guide v6.. - Muthén & Muthén

Mplus Users Guide v6.. - Muthén & Muthén

Mplus Users Guide v6.. - Muthén & Muthén

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 3EXAMPLE 3.1: LINEAR REGRESSIONTITLE: this is an example of a linear regressionfor a continuous observed dependentvariable with two covariatesDATA: FILE IS ex3.1.dat;VARIABLE: NAMES ARE y1-y6 x1-x4;USEVARIABLES ARE y1 x1 x3;MODEL: y1 ON x1 x3;In this example, a linear regression is estimated.TITLE:this is an example of a linear regressionfor a continuous observed dependentvariable with two covariatesThe TITLE command is used to provide a title for the analysis. The titleis printed in the output just before the Summary of Analysis.DATA:FILE IS ex3.1.dat;The DATA command is used to provide information about the data setto be analyzed. The FILE option is used to specify the name of the filethat contains the data to be analyzed, ex3.1.dat. Because the data set isin free format, the default, a FORMAT statement is not required.VARIABLE:NAMES ARE y1-y6 x1-x4;USEVARIABLES ARE y1 x1 x3;The VARIABLE command is used to provide information about thevariables in the data set to be analyzed. The NAMES option is used toassign names to the variables in the data set. The data set in thisexample contains ten variables: y1, y2, y3, y4, y5, y6, x1, x2, x3, andx4. Note that the hyphen can be used as a convenience feature in orderto generate a list of names. If not all of the variables in the data set areused in the analysis, the USEVARIABLES option can be used to select asubset of variables for analysis. Here the variables y1, x1, and x3 havebeen selected for analysis. Because the scale of the dependent variableis not specified, it is assumed to be continuous.22

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!