examples from singer’s using sas proc mixed to fit multilevel models…
DESCRIPTION
Examples from Singer’s Using SAS Proc Mixed to Fit Multilevel Models…. “ To use the paper effectively, … in particular the reader must understand: The difference between a fixed effect and a random effect The notion of multiple levels with a hierarchy - PowerPoint PPT PresentationTRANSCRIPT
Examples from Singer’s Using SAS Proc Mixed to Fit Multilevel Models…Examples from Singer’s Using SAS Proc Mixed to Fit Multilevel Models…
““To use the paper effectively, … in particular the reader To use the paper effectively, … in particular the reader must understand: must understand:
The difference between a fixed effect and a random The difference between a fixed effect and a random effecteffect
The notion of multiple levels with a hierarchyThe notion of multiple levels with a hierarchy
The notion that error variance-covariance matrix can The notion that error variance-covariance matrix can take on different structurestake on different structures
That centering can be a helpful way of parameterizing That centering can be a helpful way of parameterizing the models so that the results are more easily the models so that the results are more easily interpreted”interpreted”
Example 1 in HLM: Unconditional Means ModelExample 1 in HLM: Unconditional Means Model
Focus on showing how to make .mdm file based on a single Stata fileFocus on showing how to make .mdm file based on a single Stata fileDecomposition of variance into between and within varianceDecomposition of variance into between and within varianceIntraclass correlationIntraclass correlationExploring the data graphically: Exploring the data graphically:
FileFileGraph DataGraph Databox-whisker plots (outcome variable)box-whisker plots (outcome variable) FileFileGraph DataGraph Dataline plots, scatter plots line plots, scatter plots
(outcome variable on a predictor variable)(outcome variable on a predictor variable)
ijjij ry
Example 2 in HLM: Include both level-1 Example 2 in HLM: Include both level-1 and level-2 predictorsand level-2 predictors
Level-1 variable SES is group-mean centeredLevel-1 variable SES is group-mean centered
Using level-2 variables to model random Using level-2 variables to model random intercept and random slopeintercept and random slope
Showing the mixed model versionShowing the mixed model version
jjj
jjj
ijijjjij
uSECTORMEANSES
uSECTORMEANSES
rSESSESy
11211101
00201000
10 )(
Continued…Continued…
Estimation method: REML vs. MLEstimation method: REML vs. MLHypothesis testingHypothesis testing
Example 3 in HLM: Unconditional Linear Growth ModelExample 3 in HLM: Unconditional Linear Growth Model
Use existing .mdm file to build up a modelUse existing .mdm file to build up a modelExploring the data graphicallyExploring the data graphicallyExploring the model graphicallyExploring the model graphically
-0.15 0.67 1.50 2.32 3.1585.70
142.35
199.00
255.65
312.30
TIME
Y
62.23
111.69
161.16
210.62
260.09
INT
ER
CE
PT
0 9.25 18.50 27.75 37.00
-28.69
-16.52
-4.34
7.83
20.01
Le
ve
l-1
Re
sid
ua
l
98.67 151.86 205.06 258.26
Level-1 Predicted Value
Example 1 in MLwiN: Unconditional Means ModelExample 1 in MLwiN: Unconditional Means ModelFocus on showing how to input dataFocus on showing how to input data
ASCII format file (tab delimited file)ASCII format file (tab delimited file)
Continued…Continued…
Stata2mlwin by Michael Mitchell (ATS), creating an ASCII data file Stata2mlwin by Michael Mitchell (ATS), creating an ASCII data file and an MLwiN command file (.obe file) to read the ASCII file with and an MLwiN command file (.obe file) to read the ASCII file with variable names into MLwiNvariable names into MLwiN
stata2mlwin using hsb12, replacestata2mlwin using hsb12, replace
Continued…Continued…
REML vs. MLREML vs. MLDecomposition of variance into between and within varianceDecomposition of variance into between and within varianceIntraclass correlationIntraclass correlation
ijjij ry
Example 2 in MLwiN: Include both level-1 and level-2 predictorsExample 2 in MLwiN: Include both level-1 and level-2 predictors
Example 3 in MLwiN: Unconditional Linear Growth ModelExample 3 in MLwiN: Unconditional Linear Growth Model
Model-based GraphicsModel-based Graphics
Model-based GraphicsModel-based Graphics