36
Mplus for Windows: An Introduction and Overview Alan C. Acock Department of HDFS Oregon State University Topics 1. Using Mplus 2 1.1. Launching Mplus 2 1.2. Input and Output Windows 2 1.3. Reading Data and Outputting Sample Statistics 5 1.4. Defaults 6 1.5. Commands 6 2. Exploratory Factor Analysis 8 2.1. Exploratory Factor Analysis with Continuous Variables 8 2.2. Comparing Solutions 9 2.3. Exploratory Factor Analysis with Categorical Variables 10 3. Confirmatory Factor Analysis 13 3.1. Confirmatory Factor Analysis with Continuous Variables 14 3.2. Output and Interpretation 16 Introduction to Mplus, Alan C. Acock 1

Mplus for Windows: An Introduction - University of … - may 2007 - Intro-to Mplus_UN.doc · Web viewExploratory Factor Analysis 8 2.1. Exploratory Factor Analysis with Continuous

Embed Size (px)

Citation preview

Page 1: Mplus for Windows: An Introduction - University of … - may 2007 - Intro-to Mplus_UN.doc · Web viewExploratory Factor Analysis 8 2.1. Exploratory Factor Analysis with Continuous

Mplus for Windows: An Introduction and OverviewAlan C. Acock

Department of HDFSOregon State University

Topics

1. Using Mplus 2

1.1. Launching Mplus 2

1.2. Input and Output Windows 2

1.3. Reading Data and Outputting Sample Statistics 5

1.4. Defaults 6

1.5. Commands 6

2. Exploratory Factor Analysis 8

2.1. Exploratory Factor Analysis with Continuous Variables

8

2.2. Comparing Solutions 9

2.3. Exploratory Factor Analysis with Categorical Variables

10

3. Confirmatory Factor Analysis 13

3.1. Confirmatory Factor Analysis with Continuous Variables

14

3.2. Output and Interpretation 16

3.2.1. Missing value summary 16

3.2.2. Model fit 18

Introduction to Mplus, Alan C. Acock 1

Page 2: Mplus for Windows: An Introduction - University of … - may 2007 - Intro-to Mplus_UN.doc · Web viewExploratory Factor Analysis 8 2.1. Exploratory Factor Analysis with Continuous

3.2.3. Model results 18

4. Path Analysis 21

4.1. Model and Program 22

4.2. Indirect Effects 22

5. Putting it Together—Structural Equation Model 23

5.1. Model and Program 23

5.2. Output and Interpretation 23

5.3. Interpretation of Modification Indices 28

6. Summary 28

Introduction to Mplus, Alan C. Acock 2

Page 3: Mplus for Windows: An Introduction - University of … - may 2007 - Intro-to Mplus_UN.doc · Web viewExploratory Factor Analysis 8 2.1. Exploratory Factor Analysis with Continuous

Section 1: Using Mplus

1.1. Launching Mplus

1.2. Input and Output Windows

The window shown above is the input window. You write Mplus programs in this window to read the data to be

analyzed and to specify your model of interest. You then save your Mplus program and select Run Mplus from the

Mplus menu to submit your program to the Mplus engine for processing.

► File

► Open

Open ex1.inp. This is located at c:\Mplus Examples\ ex1.inp

Introduction to Mplus, Alan C. Acock 3

Page 4: Mplus for Windows: An Introduction - University of … - may 2007 - Intro-to Mplus_UN.doc · Web viewExploratory Factor Analysis 8 2.1. Exploratory Factor Analysis with Continuous

Here is one screen of the data in ex1.dat

We have labeled missing values with a -9. Easiest to pick one value that will work for all variables—can be any number or a dot.

Notice we have one observation, case 13, that has a missing value on all variables.

The data happens to be in a fixed format. Could be comma delimited, cvs file from Excel. Could be free format, other formats possible but more complicated

Introduction to Mplus, Alan C. Acock 4

Page 5: Mplus for Windows: An Introduction - University of … - may 2007 - Intro-to Mplus_UN.doc · Web viewExploratory Factor Analysis 8 2.1. Exploratory Factor Analysis with Continuous

Here is the confirmatory factor analysis model we are estimating

We will explain the program in a moment, but for now we will just run it to see how the interface works.

Introduction to Mplus, Alan C. Acock 5

Page 6: Mplus for Windows: An Introduction - University of … - may 2007 - Intro-to Mplus_UN.doc · Web viewExploratory Factor Analysis 8 2.1. Exploratory Factor Analysis with Continuous

► Mplus        ► Run Mplus Or, you can click the Run icon.Once Mplus has finished processing your command program, it replaces the input window with the output window.

The output window first displays your Mplus program. Below the Mplus program are the Mplus model results. If there is an error in your Mplus program or you want to modify your

Mplus program in any way (e.g., to fit a different model to the data), you must return to the appropriate command file by selecting that file's name from the File menu's list of recently-accessed files. That action returns the input window's contents to the screen and you can then modify the previous commands, save the modified command file, and run Mplus once again to obtain new output.

1.3. Reading Data and Outputting Sample Statistics

After you have launched Mplus, you may build a command file. There are nine sets of Mplus commands (ususally only a few of these are used :

1. TITLE:2. DATA: (required), 3. VARIABLE: (required), 4. DEFINE: 5. SAVEDATA: 6. ANALYSIS: 7. MODEL: 8. OUTPUT: and 9. MONTECARLO:

Rules:

1. All commands must begin on a new line2. All command names must be followed by a colon. e.g., Title: Once

you enter the colon, the key word becomes blue to highlight it.

Introduction to Mplus, Alan C. Acock 6

Page 7: Mplus for Windows: An Introduction - University of … - may 2007 - Intro-to Mplus_UN.doc · Web viewExploratory Factor Analysis 8 2.1. Exploratory Factor Analysis with Continuous

3. Semicolons separate command options. There can be more than one option per line.

4. The records in the input setup must be no longer than 80 columns. They can contain upper and/or lower case letters and tabs.

5. Variable names are case sensitive. (Y1 and y1 are different variables)

1.4. Defaults

This is very confusing now but you might refer back to this later. Parameters such as loadings can be fixed, e.g., many loadings are fixed at 0.0 in the CFA models because the item should not load on the factor. There is no path from f1 to y4 in our figure.

Fixed parameters can be “freed” meaning you will estimate them. We could add a path from f1 to y4 or let e1 be correlated with e4

Fixed parameters are required to say at this value and freed parameters are allowed to change.

The iterations change values of free parameters until the model’s fit is optimal.

Unless we say otherwise, Mplus will fix the first indicator’s loading at 1.0 as the reference indicator. For example, f1y1 has a fixed loading of 1.0.

1.5. Commands

The TITLE command allows you to specify a title that Mplus will print on each page of the output file. This can go on and on for many lines and usually should. Everything is a Title until a command name appears at the start of a new line.

The DATA command specifies where Mplus will locate the data, the format of the data, and the names of variables. At present, Mplus will read the following file formats:

tab-delimited text, space-delimited text, and

Introduction to Mplus, Alan C. Acock 7

Page 8: Mplus for Windows: An Introduction - University of … - may 2007 - Intro-to Mplus_UN.doc · Web viewExploratory Factor Analysis 8 2.1. Exploratory Factor Analysis with Continuous

comma-delimited text. The input data file may contain records in free field format or fixed

format. If you are using data stored in another form (e.g., Stata, SAS, SPSS, or

Excel), you will need to convert it to one of the formats with which Mplus can work before you read it into Mplus.

SAS and SPSS require you to write a file out as a fixed format ASCII file. If you have the data in Stata you can use stata2mplus to set things up for you. UCLA folks wrote the stata2mplus do file. You can obtain it using findit stata2mplus and install the program.

Here is the Stata session:

stata2mplus using "I:\flash\HDFS630\mplus\classnsfh", replace

This creates a comma delimit ASCII file that Mplus can read called classnsfh.dat. It also creates a program file called classnsfh.inp that will run a basic analysis in Mplus. Missing values will be coded as -9999 and the file will be comma separated.

1,1,1,1,2,1,1,1,1,1,1,1,2,1,12,2,1,1,1,2,1,2,2,2,1,2,2,1,11,1,1,1,1,1,1,1,1,1,1,1,1,1,11,1,2,1,1,2,1,1,1,2,2,1,1,1,13,2,2,3,2,3,2,2,2,2,2,2,2,2,2 2,1,1,1,2,1,2,2,1,1,1,1,1,2,12,1,2,1,1,2,1,1,1,2,2,1,1,1,11,1,1,-9999,1,2,2,1,2,2,2,2,2,1,13,3,3,3,3,3,3,3,3,3,3,3,3,3,32,2,1,2,1,2,2,1,1,2,1,-9999,1,1,1

The DATA command tells Mplus where the data is stored. If you store the program and the data in the same folder, you don’t need to include the path. A long file reference can exceed the character limits per line in Mplus.

The VARIABLE command names the columns of data that Mplus reads.

Introduction to Mplus, Alan C. Acock 8

Page 9: Mplus for Windows: An Introduction - University of … - may 2007 - Intro-to Mplus_UN.doc · Web viewExploratory Factor Analysis 8 2.1. Exploratory Factor Analysis with Continuous

These must be in the identical order to the way Stata/SAS/SPSS wrote the data file. Variable names may not have more than 8 characters and are case sensitive.

The ANALYSIS command tells Mplus what type of analysis to perform. Many analysis options are available. We use it in the example because we need to deal with missing values. To just do a CFA using casewise deletion we would not need the Analysis section.

SECTION 2: Exploratory Factor Analysis

2.1. Exploratory Factor Analysis with Continuous Variables

TITLE: efa1.inp This is an example of an exploratory factor analysis with continuous factor indicatorsDATA: FILE IS "c:\Mplus Examples\efa1.dat";VARIABLE: NAMES ARE y1-y12;ANALYSIS: TYPE = EFA 1 4;

ESTIMATOR = ml;OUTPUT: sampstat;

The EFA tells Mplus to perform an exploratory factor analysis. The 1 and 4 following the EFA specification tells Mplus to generate all possible factor solutions between and including 1 and 4. Finally, the ESTIMATOR = ml option has Mplus use the maximum likelihood estimator to perform the factor analysis and compute a chi-square goodness of fit test that the number of hypothesized factors is sufficient to account for the correlations among the six variables in the analysis.

If your data are not joint multivariate normally distributed, you may want to replace the ml with either the mlm or mlmv estimators. One useful feature of Mplus is its ability to handle non-normal input data. Recall that the default ml estimator assumes that the input data are

Introduction to Mplus, Alan C. Acock 9

Page 10: Mplus for Windows: An Introduction - University of … - may 2007 - Intro-to Mplus_UN.doc · Web viewExploratory Factor Analysis 8 2.1. Exploratory Factor Analysis with Continuous

distributed joint multivariate normal. If you have reason to believe that this assumption has not been met and your sample is reasonably large (e.g., n ≥ 200), you may substitute mlm or mlmv in place of ml on the ESTIMATOR = line.

The mlm option provides a mean-adjusted chi-square model test statistic whereas the

mlmv option produces a mean and variance adjusted chi-square test of model fit.

SEM users who are familiar with Bentler's EQS software program should also note that the mlm chi-square test and standard errors are equivalent to those produced by EQS in its ML;ROBUST method.

You may also add the OUTPUT command following the ANALYSIS command. The OUTPUT command is used to specify optional output. For this example the keyword sampstat tells Mplus to include sample statistics as part of its printed output.

    OUTPUT:    sampstat ;

Mplus produces the sample correlations, Root Mean Square Error of Approximation (RMSEA), and the Chi-square test of the one factor model to the sample data.

As you can see from the results, shown below, the chi-square test is statistically significant, so the null hypothesis that a single factor fits the data is rejected; more factors are required to obtain a non-significant chi-square.

Since the Chi-square test is sensitive to sample size (such that large samples often return statistically significant chi-square values) and non-normality in the input variables, Mplus also provides the Root Mean Square Error of Approximation (RMSEA) statistic. The RMSEA is not as sensitive to large sample sizes. According to Hu and Bentler (1999), RMSEA values below .06 indicate satisfactory model fit. Kline indicates a .08 is acceptable.

Run the program and interpret the results.

Introduction to Mplus, Alan C. Acock 10

Page 11: Mplus for Windows: An Introduction - University of … - may 2007 - Intro-to Mplus_UN.doc · Web viewExploratory Factor Analysis 8 2.1. Exploratory Factor Analysis with Continuous

2.2. Comparing two Solutions

You can test whether the adding additional factors significantly improves the fit to the data.

Model 1 chi-square (54 degrees of freedom) = 1055.74; p < .001Model 2 chi-square (43 degrees of freedom) = 672.258; p < .001Model 3 chi-square (33 degrees of freedom) = 341.268; p < .001Model 4 chi-square (24 degrees of freedom) = 25.799; p not significant

Is model 4 better than model 3.

Model 3 chi-square (33 degrees of freedom) = 341.268Model 4 chi-square (24 degrees of freedom) = 25.799Difference chi-square ( 9 degrees of freedom) = 315.469; p < .001This is significant at the .05 level

With Stata, you can get the probability when this is not in a table

. display 1-chi2(9,315.469)0

This is obviously less than .05.

Often you can’t use tables for chi-square because you have lots of degrees of freedom and tables only show significance levels for relatively few degrees of freedom.

2.3. Exploratory Factor Analysis with Categorical Outcomes

For the purposes of illustration, suppose that you recode each variable into a replacement variable where all six variables' values at the median or below are assigned a categorical value of 1.00 and all values above the median assigned a value of 2.00.

Mplus recodes the lowest value to zero with subsequent values increasing in units of 1.00.

Introduction to Mplus, Alan C. Acock 11

Page 12: Mplus for Windows: An Introduction - University of … - may 2007 - Intro-to Mplus_UN.doc · Web viewExploratory Factor Analysis 8 2.1. Exploratory Factor Analysis with Continuous

While the four underlying latent factors remain continuous, the six categorical observed variables' response values are now ordered dichotomous categories.

You may use the program that appeared in the initial exploratory factor analysis example, with the following modifications, and the new data file that contains the categorical variables ex4.2.dat, as shown below.

TITLE: ex4.2.inp This is an example of an exploratory

factor analysis with categorical factor indicators

It uses weighted least squares estimationIt computes tetrachoric correlations and does theFactor analysis on them. The RMSEA and chi-squareValues are reported.

DATA: FILE IS ex4.2.dat;VARIABLE: NAMES ARE u1-u12;

CATEGORICAL ARE u1-u12;ANALYSIS: TYPE = EFA 1 4; Estimator = wlsmv;OUTPUT: sampstat ;

You tell Mplus which variables are categorical with the CATEGORICAL subcommand of the DATA command, like this:

    CATEGORICAL ARE u1 – u2 ;

You should also change the ESTIMATOR option for the ANALYSIS command.

    ANALYSIS:    TYPE = efa 1 2;                ESTIMATOR = wlsmv ;

Selected output from the analysis appears below. Notice that the

Introduction to Mplus, Alan C. Acock 12

Page 13: Mplus for Windows: An Introduction - University of … - may 2007 - Intro-to Mplus_UN.doc · Web viewExploratory Factor Analysis 8 2.1. Exploratory Factor Analysis with Continuous

categorical nature of the data precludes computation of the descriptive model fit statistics such as the RMSEA, though Mplus does produce the familiar chi-square test of overall model fit. EXPLORATORY ANALYSIS WITH 4 FACTOR(S) :

CHI-SQUARE VALUE 20.846 DEGREES OF FREEDOM 22 PROBABILITY VALUE 0.5303

RMSEA (ROOT MEAN SQUARE ERROR OF APPROXIMATION) : ESTIMATE IS 0.000

ROOT MEAN SQUARE RESIDUAL IS 0.0259

The chi-square result for the four factor model is not significant, which indicates that four factors are sufficient to explain the correlations among the twelve observed variables.

Run this to get the results and interpret the four factor solution:

PROMAX ROTATED LOADINGS 1 2 3 4 ________ ________ ________ ________ U1 0.626 0.090 -0.009 -0.066 U2 0.941 -0.023 0.037 0.066 U3 0.685 -0.028 -0.078 -0.042 U4 0.108 -0.115 0.709 0.013 U5 -0.090 0.027 0.811 0.036 U6 0.043 0.094 0.605 -0.032 U7 0.016 0.804 -0.020 -0.003 U8 -0.045 0.720 -0.008 -0.039 U9 0.012 0.669 0.029 0.017 U10 -0.057 0.060 -0.008 0.655 U11 0.011 -0.053 0.053 0.876 U12 0.116 0.022 -0.061 0.623

PROMAX FACTOR CORRELATIONS 1 2 3 4 ________ ________ ________ ________ 1 1.000 2 0.047 1.000 3 -0.068 0.027 1.000 4 -0.041 -0.051 -0.184 1.000

Introduction to Mplus, Alan C. Acock 13

Page 14: Mplus for Windows: An Introduction - University of … - may 2007 - Intro-to Mplus_UN.doc · Web viewExploratory Factor Analysis 8 2.1. Exploratory Factor Analysis with Continuous

This is the solution for continuous variables. You would reach the same conclusions, although there are some differences.

The categorical solution is seeking to get the same results even though the data has been collapsed into just two categories for each variable.

           PROMAX ROTATED LOADINGS 1 2 3 4 ________ ________ ________ ________ Y1 0.636 0.070 -0.022 0.007 Y2 0.809 -0.010 0.040 0.021 Y3 0.631 -0.063 -0.029 -0.043 Y4 0.030 -0.004 -0.014 0.646 Y5 -0.024 -0.025 0.022 0.761 Y6 0.014 0.029 -0.007 0.674 Y7 -0.008 0.734 0.018 0.001 Y8 -0.042 0.727 -0.016 -0.001 Y9 0.046 0.706 -0.001 -0.009 Y10 -0.030 -0.009 0.693 0.011 Y11 0.012 0.002 0.792 0.019 Y12 0.041 0.009 0.659 -0.032

PROMAX FACTOR CORRELATIONS 1 2 3 4 ________ ________ ________ ________ 1 1.000 2 0.017 1.000 3 -0.011 -0.030 1.000 4 -0.044 0.035 -0.134 1.000

  The RMSEA is .00 and the standardized root mean residual, RMR:

ROOT MEAN SQUARE RESIDUAL IS         .0259

The value of .026 suggests an excellent fit of the four factor model to the observed data.

There are several notes worth keeping in mind when you perform exploratory factor analysis with categorical outcome variables.

Although one or more of the observed variables may be categorical, any latent variables in the model are assumed to be continuous (this is a property of the exploratory factor analysis model.

The analysis specification and interpretation of the output is the same whether one, a subset, or all observed variables are categorical.

Introduction to Mplus, Alan C. Acock 14

Page 15: Mplus for Windows: An Introduction - University of … - may 2007 - Intro-to Mplus_UN.doc · Web viewExploratory Factor Analysis 8 2.1. Exploratory Factor Analysis with Continuous

Categorical observed variables may be dichotomous or ordered categorical outcomes of more than two levels), but nominal level observed variables with more than two categories may not be used in the analysis as outcome variables using this strategy. A series of dummies as used in dummy variable regression might work.

Sample size requirements are somewhat more stringent than for continuous variables; typically you want a minimum of 200 cases (preferably more) to perform any analysis with categorical outcome variables.

SECTION 3: Confirmatory Factor Analysis

What if you had an a priori hypothesis that the visual perception, cubes, and lozenges variables belonged to a single factor whereas the paragraph, sentence, and word meaning variables belonged to a second factor? The diagram shown below illustrates the model visually.

You can test this hypothesized factor structure using confirmatory factor analysis, as shown in the next section.

Introduction to Mplus, Alan C. Acock

F1 F2

Y1

e1

Y1

e1

Y1

e1

Y1

e1

Y1

e1

Y1

e1

15

Page 16: Mplus for Windows: An Introduction - University of … - may 2007 - Intro-to Mplus_UN.doc · Web viewExploratory Factor Analysis 8 2.1. Exploratory Factor Analysis with Continuous

3.1. Confirmatory Factor Analysis with Continuous Variables

TITLE: ex1.inp

CFA with continuous factor indicators There are Missing values DATA: FILE IS "c:\mplus examples\ex1.dat" ;VARIABLE: NAMES ARE y1-y6; MISSING ARE all (-9) ;ANALYSIS: TYPE = MISSING H1;MODEL: f1 BY y1-y3; f2 BY y4-y6;OUTPUT: sampstat standardized residual patterns mod(3.84);

When Mplus sees EFA it sets up the relationship in a certain way, but in a CFA, Mplus needs you to tell it how to set up the relationships that you wish to confirm fit the data).

The model is general in the sense that o You must define what parameters are estimated; o All other parameters are assumed to be fixed. o Fixed parameters are either zero or some value you set.

Under VARIABLE we have defined what code is used to represent missing values.

Under the ANALYSIS section we have indicated a special type of analysis that does full information maximum likelihood estimation.

o This only works for maximum likelihood estimation of parameters and would not work, for example, if you had categorical variables.

o If there were no missing values, this section would not be required.

Introduction to Mplus, Alan C. Acock 16

Page 17: Mplus for Windows: An Introduction - University of … - may 2007 - Intro-to Mplus_UN.doc · Web viewExploratory Factor Analysis 8 2.1. Exploratory Factor Analysis with Continuous

The MODEL command allows you to specify the parameters of your model.

o The first line of the MODEL command shown above defines a latent factor for the first factor.

o The BY keyword (an abbreviation for "measured by") is used to define the latent variables;

o The latent variable name appears on the left-hand side of the BY keyword whereas the measured variables appear on the right-hand side of the BY keyword.

o It has three observed indicator variables: visperc, cubes, and lozenges.

o Mplus will fix the loading for the first indicator at 1.0 unless you tell it otherwise. Put the “best” indicator first.

Similarly, in the second line of the MODEL command a latent factor called verbal has three indicators: paragrap, sentence, and wordmean. The third line of MODEL command uses the WITH keyword to correlate the visual latent factor with the verbal latent factor.

By è Measured byWith è Correlated with

We do not need f1 with f2 because that is the default. If we wanted to see how the model did with these fixed we would add the line f1 with f2@0 ;

Finally, the OUTPUT command contains an added keyword, standardize. This option instructs Mplus to output standardized parameter estimate values in addition to the default unstandardized values. Selected output from the analysis appears below.

Why is one loading fixed at 1.0?

The default fixes the unstandardized loading of the first item after BY at 1.0

This has to do with model identification. In exploratory factor analysis the variance of the factor (latent variable) is fixed at 1.0

Introduction to Mplus, Alan C. Acock 17

Page 18: Mplus for Windows: An Introduction - University of … - may 2007 - Intro-to Mplus_UN.doc · Web viewExploratory Factor Analysis 8 2.1. Exploratory Factor Analysis with Continuous

by the program. Given this, the program estimates the loadings. You need to set a variance for the latent variable because the size of the loadings are scaled from the size of the variance. Setting the variance of the latent variable (factor) at 1.0 solves this problem and you get standardized loadings. This is possible with Mplus, but Mplus suggests a more general approach in which you fix one of the loadings of each latent variable (factor) at 1.0.

Why is this more general? Suppose you wanted to compare boys and girls on these tests. Girls and boys might differ in the loadings because some skills may be more central to girls overall skills than they are to boys. Studying marital satisfaction we might find that emotional support is more central to marital satisfaction among wives than it is among husbands. At the same time (and here comes the answer), one group might be more variable than another. We might find that girls not only have higher verbal skills than boys, but that they are either more homogeneous or more heterogeneous in these skills. An intervention that not only improves the mean outcome, but does so in a way that makes the distribution more homogeneous is preferred. In some cases we are interested in the variances of the latent variables as an important topic and we could not study that if we fixed the variance at 1.0.

Regardless of which item you pick to fix the loading at 1, the standardized solution will always be the same because that solution rescales the variance of the latent variable to be 1 and the fully standardized solution also rescales the variance of each indicator to be 1.

We should pick the strongest indicator at 1.0. This makes the results less confusing to readers because all of the loadings will be less than 1.0. If you fixed a weak indicator at 1.0, an indicator that was twice as strong would have a loading of 2.0 and that would be confusing to readers. You do not need to fix the loadings at 1, any number will identify the model equally well.

3.2.1 Output and Interpret

Introduction to Mplus, Alan C. Acock 18

Page 19: Mplus for Windows: An Introduction - University of … - may 2007 - Intro-to Mplus_UN.doc · Web viewExploratory Factor Analysis 8 2.1. Exploratory Factor Analysis with Continuous

3.2.1 Missing value summarySUMMARY OF DATA Number of patterns 8

SUMMARY OF MISSING DATA PATTERNS

MISSING DATA PATTERNS 1 2 3 4 5 6 7 8 Y1 x x x x x x x Y2 x x x x x x x Y3 x x x x x x x Y4 x x x x x Y5 x x x x x x x Y6 x x x x x

MISSING DATA PATTERN FREQUENCIES Pattern Frequency Pattern Frequency Pattern Frequency 1 473 4 1 7 2 2 15 5 1 8 3 3 3 6 1

COVARIANCE COVERAGE OF DATAMinimum covariance coverage value 0.100

PROPORTION OF DATA PRESENT Covariance Coverage Y1 Y2 Y3 Y4 Y5 ________ ________ ________ ________ ________ Y1 0.994 Y2 0.990 0.996 Y3 0.992 0.994 0.998 Y4 0.984 0.986 0.988 0.990 Y5 0.992 0.994 0.996 0.990 0.998 Y6 0.960 0.962 0.964 0.960 0.966

Covariance Coverage Y6 ________ Y6 0.966

3.2.2. Model Fit

THE MODEL ESTIMATION TERMINATED NORMALLY

TESTS OF MODEL FITChi-Square Test of Model Fit Value 3.895

Introduction to Mplus, Alan C. Acock 19

Page 20: Mplus for Windows: An Introduction - University of … - may 2007 - Intro-to Mplus_UN.doc · Web viewExploratory Factor Analysis 8 2.1. Exploratory Factor Analysis with Continuous

Degrees of Freedom 8 P-Value 0.8665

Chi-Square Test of Model Fit for the Baseline Model Value 589.067 Degrees of Freedom 15 P-Value 0.0000

CFI/TLI CFI 1.000 TLI 1.013

Loglikelihood H0 Value -4850.279 H1 Value -4848.331

Information Criteria Number of Free Parameters 19 Akaike (AIC) 9738.558 Bayesian (BIC) 9818.597 Sample-Size Adjusted BIC 9758.290 (n* = (n + 2) / 24)

RMSEA (Root Mean Square Error Of Approximation) Estimate 0.000 90 Percent C.I. 0.000 0.027 Probability RMSEA <= .05 0.995

SRMR (Standardized Root Mean Square Residual) Value 0.015

3.2.3. Model results

MODEL RESULTS

Estimates S.E. Est./S.E. Std StdYX

F1 BY Y1 1.000 0.000 0.000 0.955 0.683 Y2 1.123 0.098 11.430 1.072 0.767 Y3 1.019 0.088 11.532 0.973 0.695

F2 BY Y4 1.000 0.000 0.000 0.886 0.616 Y5 1.032 0.129 7.972 0.915 0.702 Y6 0.869 0.105 8.316 0.771 0.596

Introduction to Mplus, Alan C. Acock 20

Page 21: Mplus for Windows: An Introduction - University of … - may 2007 - Intro-to Mplus_UN.doc · Web viewExploratory Factor Analysis 8 2.1. Exploratory Factor Analysis with Continuous

F1 WITH F2 -0.033 0.053 -0.621 -0.039 -0.039

Intercepts Y1 -0.017 0.063 -0.267 -0.017 -0.012 Y2 0.030 0.063 0.478 0.030 0.021 Y3 0.037 0.063 0.590 0.037 0.026 Y4 -0.022 0.065 -0.336 -0.022 -0.015 Y5 -0.012 0.058 -0.209 -0.012 -0.009 Y6 0.066 0.059 1.120 0.066 0.051

Variances F1 0.912 0.125 7.308 1.000 1.000 F2 0.786 0.138 5.677 1.000 1.000

Residual Variances Y1 1.041 0.095 10.977 1.041 0.533 Y2 0.803 0.100 8.044 0.803 0.411 Y3 1.012 0.095 10.612 1.012 0.517 Y4 1.287 0.123 10.449 1.287 0.621 Y5 0.861 0.112 7.664 0.861 0.507 Y6 1.077 0.098 10.992 1.077 0.645

R-SQUARE

Observed Variable R-Square

Y1 0.467 (Note, this is 1-residual variance, 1-.533 = .467) Y2 0.589 Y3 0.483 Y4 0.379 Y5 0.493 Y6 0.355

Using Stata you can get the two tail probability for any of these z-scores. This is handy if you do not have a table with you.

. di 2*(1-norm(1.96))

.04999579

For example,

Introduction to Mplus, Alan C. Acock 21

Page 22: Mplus for Windows: An Introduction - University of … - may 2007 - Intro-to Mplus_UN.doc · Web viewExploratory Factor Analysis 8 2.1. Exploratory Factor Analysis with Continuous

. display 2*(1-norm(3.943))

.00008047

Each unstandarized estimate represents the amount of change in the outcome variable as a function of a single unit change in the variable causing it.

Different measures often have different scales, so you will often find it useful to examine the standardized coefficients when you want to compare the relative strength of associations across observed variables that are measured on different scales.

Mplus provides two standardized coefficients. The first, labeled Std on the output, standardizes using the latent variables' variances whereas

The second type of standardized coefficient, StdYX, standardizes based on latent and observed variables' variances. This standardized coefficient represents the amount of change in an outcome variable per standard deviation unit of a predictor variable.

When would you use Std, that standardizes only on the latent variable? Since the variance of the latent variable is arbitrary, setting it to 1.0

simplifies things. IF ALL INDICATORS ARE ON THE SAME SCALE, then Std may make

sense. A 1 unit change in the latent variable using Std, is one standard deviation. So, if the latent variable score is one standard deviation higher this means your score on item 1 will be x1 units higher, your score on x2 will be y units higher, etc. Say your indicators are on a 0-10 scale, the Std for x1 is 2.3 and for x2 it is 4.6. This shows that x2 is much more sensitive to the latent variable. However, if the indicators are on different scale, say x1 is on a 0-10 scale and x2 is on a 21-49 scale, then these numbers would not make much sense and the StdYX standardization, fully standardized, would make sense.

Finally, the r-square output illustrates the amount of variance accounted for in the indicators.

As is the case with exploratory factor analysis of continuous outcome variables, you may want to use the mlm or mlmv estimators in lieu of the

Introduction to Mplus, Alan C. Acock 22

Page 23: Mplus for Windows: An Introduction - University of … - may 2007 - Intro-to Mplus_UN.doc · Web viewExploratory Factor Analysis 8 2.1. Exploratory Factor Analysis with Continuous

default ml estimator if your input data are not distributed joint multivariate normal by using the ESTIMATOR = option on the ANALYSIS command. The mlm option provides a mean-adjusted chi-square model test statistic whereas the mlmv option produces a mean and variance adjusted chi-square test of model fit; both options also induce Mplus to produce robust standard errors displayed in the model results table that are used to compute Z tests of significance for individual parameter estimates. These can’t handle missing values and resort to casewise deletion.

SECTION 4: Path Analysis

4.1. Model and Program

TITLE: ex4.inp This is an example of a path analysis

with continuous dependent variablesDATA: FILE IS ex4.dat;VARIABLE: NAMES ARE y1-y3 x1-x3;MODEL: y1 ON x1 x2 x3; y2 on x1 x2 x3;

y3 ON y1 y2 x2; MODEL indirect: y2 ind x1;

Introduction to Mplus, Alan C. Acock 23

Page 24: Mplus for Windows: An Introduction - University of … - may 2007 - Intro-to Mplus_UN.doc · Web viewExploratory Factor Analysis 8 2.1. Exploratory Factor Analysis with Continuous

y2 ind x2; y2 ind x3; y3 ind x1; y3 ind x2; y3 ind x3;OUTPUT: standardized mod(3.84);

4.2. Indirect Effects

The MODEL INDIRECT: subcommand estimates indirect effects for you You get the Total indirect effect that combines as many specific

indirect effects as there are in the model Specific indirect effects of x1 go y3 include

o x1 y1 y3o x1 y2 y3

Tests of significant for both specific and total indirect effects

Estimate and interpret the output

Introduction to Mplus, Alan C. Acock 24

Page 25: Mplus for Windows: An Introduction - University of … - may 2007 - Intro-to Mplus_UN.doc · Web viewExploratory Factor Analysis 8 2.1. Exploratory Factor Analysis with Continuous

SECTION 7: Putting it Together—Structural Equation Model

5.1. Model and Program

Interpret the figure.

Notice indirect effects.

TITLE: ex5.inp This is an example of a SEM with Continuous factor indicators

DATA: FILE IS ex5.dat;VARIABLE: NAMES ARE y1-y12;MODEL: f1 BY y1-y3;

f2 BY y4-y6; f3 BY y7-y9;

Introduction to Mplus, Alan C. Acock 25

Page 26: Mplus for Windows: An Introduction - University of … - may 2007 - Intro-to Mplus_UN.doc · Web viewExploratory Factor Analysis 8 2.1. Exploratory Factor Analysis with Continuous

f4 BY y10-y12; f4 ON f3; f3 ON f1 f2;

MODEL INDIRECT: f4 ind f1; f4 ind f2; OUTPUT: standardized mod(3.84);

5.2. Output and Interpretation

Model Fit:

TESTS OF MODEL FITChi-Square Test of Model Fit

Value 53.704 Degrees of Freedom 50 P-Value 0.3344 Excellent, not significant

Chi-Square Test of Model Fit for the Baseline Model

Value 1524.403 Degrees of Freedom 66 P-Value 0.0000

CFI/TLI

CFI 0.997 Excellent fit > .95 TLI 0.997

Loglikelihood

H0 Value -9646.960 H1 Value -9620.108

Information Criteria

Number of Free Parameters 28 Akaike (AIC) 19349.919 Bayesian (BIC) 19467.928 Sample-Size Adjusted BIC 19379.055

Introduction to Mplus, Alan C. Acock 26

Page 27: Mplus for Windows: An Introduction - University of … - may 2007 - Intro-to Mplus_UN.doc · Web viewExploratory Factor Analysis 8 2.1. Exploratory Factor Analysis with Continuous

(n* = (n + 2) / 24)

RMSEA (Root Mean Square Error Of Approximation)

Estimate 0.012 Excellent, < .06 90 Percent C.I. 0.000 0.032 CI below .08 Probability RMSEA <= .05 1.000

SRMR (Standardized Root Mean Square Residual)

Value 0.029 Excellent, < .05

MODEL RESULTS Place the results on a Figure

Estimates S.E. Est./S.E. Std StdYX

F1 BY Y1 1.000 0.000 0.000 0.940 0.679 Y2 1.183 0.102 11.611 1.112 0.780 Y3 0.938 0.085 11.065 0.881 0.637

F2 BY Y4 1.000 0.000 0.000 0.942 0.660 Y5 0.870 0.086 10.105 0.820 0.644 Y6 0.891 0.089 10.024 0.840 0.633

F3 BY Y7 1.000 0.000 0.000 1.165 0.766 Y8 0.872 0.060 14.569 1.016 0.723 Y9 0.882 0.060 14.782 1.028 0.736

F4 BY Y10 1.000 0.000 0.000 0.927 0.646 Y11 0.826 0.096 8.595 0.765 0.625 Y12 0.682 0.085 7.975 0.632 0.521

F4 ON F3 0.473 0.057 8.342 0.595 0.595

F3 ON F1 0.563 0.072 7.849 0.454 0.454 F2 0.790 0.086 9.160 0.639 0.639

F2 WITH F1 -0.030 0.055 -0.545 -0.034 -0.034

Introduction to Mplus, Alan C. Acock 27

Page 28: Mplus for Windows: An Introduction - University of … - may 2007 - Intro-to Mplus_UN.doc · Web viewExploratory Factor Analysis 8 2.1. Exploratory Factor Analysis with Continuous

Variances F1 0.884 0.121 7.310 1.000 1.000 F2 0.888 0.130 6.853 1.000 1.000

Residual Variances Y1 1.033 0.092 11.236 1.033 0.539 Y2 0.795 0.101 7.901 0.795 0.392 Y3 1.137 0.093 12.266 1.137 0.594 Y4 1.151 0.104 11.097 1.151 0.565 Y5 0.950 0.083 11.497 0.950 0.586 Y6 1.056 0.090 11.747 1.056 0.600 Y7 0.954 0.088 10.801 0.954 0.413 Y8 0.945 0.079 11.975 0.945 0.478 Y9 0.896 0.077 11.657 0.896 0.459 Y10 1.202 0.118 10.177 1.202 0.583 Y11 0.916 0.085 10.751 0.916 0.610 Y12 1.071 0.083 12.934 1.071 0.728 F3 0.550 0.091 6.054 0.405 0.405 F4 0.555 0.103 5.403 0.646 0.646

R-SQUARE

Observed Variable R-Square

Y1 0.461 Y2 0.608 Y3 0.406 Y4 0.435 Y5 0.414 Y6 0.400 Y7 0.587 Y8 0.522 Y9 0.541 Y10 0.417 Y11 0.390 Y12 0.272

Latent Variable R-Square

F3 0.595 F4 0.354

Introduction to Mplus, Alan C. Acock 28

Page 29: Mplus for Windows: An Introduction - University of … - may 2007 - Intro-to Mplus_UN.doc · Web viewExploratory Factor Analysis 8 2.1. Exploratory Factor Analysis with Continuous

QUALITY OF NUMERICAL RESULTS

Condition Number for the Information Matrix 0.458E-01 (ratio of smallest to largest eigenvalue)

TOTAL, TOTAL INDIRECT, SPECIFIC INDIRECT, AND DIRECT EFFECTS

Estimates S.E. Est./S.E. Std StdYX

Effects from F1 to F4

Total 0.266 0.043 6.130 0.270 0.270 No Direct Total indirect 0.266 0.043 6.130 0.270 0.270 Sign. indirect

Specific indirect

F4 F3 F1 0.266 0.043 6.130 0.270 0.270 Only indirect

Effects from F2 to F4

Total 0.374 0.056 6.697 0.380 0.380 Total indirect 0.374 0.056 6.697 0.380 0.380

Specific indirect

F4 F3 F2 0.374 0.056 6.697 0.380 0.380

MODEL MODIFICATION INDICES

Minimum M.I. value for printing the modification index 3.840

M.I. E.P.C. Std E.P.C. StdYX E.P.C.

BY Statements Does it make sense for Y5 to be an indicator for F3?

F3 BY Y5 4.084 -0.162 -0.188 -0.148

WITH Statements

Y3 WITH Y2 6.398 0.315 0.315 0.160Y5 WITH Y3 6.757 -0.148 -0.148 -0.084Y8 WITH Y2 5.854 -0.134 -0.134 -0.067

Introduction to Mplus, Alan C. Acock 29

Page 30: Mplus for Windows: An Introduction - University of … - may 2007 - Intro-to Mplus_UN.doc · Web viewExploratory Factor Analysis 8 2.1. Exploratory Factor Analysis with Continuous

Y9 WITH Y6 4.455 0.118 0.118 0.064

5.3. Interpretation of Modification Indices

We could reduce Chi-square, which now is Chi-square(50) = 53.704, by about 6.8 if we allowed the error term for Y5 to be correlated with the error term for Y3.

The correlation of the two errors would be about -.084—does this make sense?

We would do these one at a time We would only do it if it made sense. Say Y5 and Y3 are pen and

pencil tests and all the others are face to face interviews. There might be a method effect that we could incorporate as an error term

We might not have much to gain even if there is a big modification index if the fit is already good.

New Chi-square would be approximately Chi-square(49) = 53.704 - 6.757 = 46.947. A reduction in Chi-square of 6.757 with one degree of freedom would be highly significant. Not much need to improve on a CFI = .997; RMSEA = .012

SummaryThis provides a brief introduction to Mplus. We have not covered any of the statistical theory underlying Mplus, but this should be enough for you to read the Manual and follow more complex explications of Mplus and SEM.

Key things to remember:

1. BY means measured by and is the path (loading) between latent variables and their indicators.

2. ON is the structural path between variables. In last example, F4 depends ON F3, F3 depends ON both F1 and F2.

3. WITH means correlated with. Two uses include: a. For exogenous variables WITH means the exogenous variables

are correlated. In last example, F1 is correlated WITH F2.b. For indicators WITH means the errors/residuals are correlated.

In last examples, the modification indices suggest we might correlate the error for Y3 WITH the error for Y5.

Introduction to Mplus, Alan C. Acock 30

Page 31: Mplus for Windows: An Introduction - University of … - may 2007 - Intro-to Mplus_UN.doc · Web viewExploratory Factor Analysis 8 2.1. Exploratory Factor Analysis with Continuous

Additional introductory content is available at:http://www.ats.ucla.edu/stat/mplus/

Introduction to Mplus, Alan C. Acock 31