multilevel modeling using hlm and mlwin xiao chen ucla academic technology services
TRANSCRIPT
Multilevel Modeling Multilevel Modeling Using HLM and MLwiNUsing HLM and MLwiN
Xiao ChenXiao Chen
UCLA UCLA
Academic Technology ServicesAcademic Technology Services
Hierarchical Data StructureHierarchical Data Structure
Organizational studiesOrganizational studies Students nested in schools and variables are Students nested in schools and variables are
measured at both student level and school levelmeasured at both student level and school level
Repeated measuresRepeated measures Multiple observations are collected over time on Multiple observations are collected over time on
each personeach person
Doubly nestedDoubly nested Multiple observations are nested in individuals Multiple observations are nested in individuals
and individuals are nested within organizations and individuals are nested within organizations
Statistical Treatment of Clustered DataStatistical Treatment of Clustered Data
AggregationAggregation Moving variables from student level to school levelMoving variables from student level to school level Shift of meaningShift of meaning Ecological fallacyEcological fallacy
Relationships observed for groups necessarily hold for Relationships observed for groups necessarily hold for individualsindividuals
Neglecting the original data structureNeglecting the original data structure
DisaggregationDisaggregation Moving variables from school level to student levelMoving variables from school level to student level Both macro level and micro level variables exist in the Both macro level and micro level variables exist in the
modelmodel Data has only micro level variablesData has only micro level variables
What can Multilevel Modeling do?What can Multilevel Modeling do?
Improving estimation of effects within Improving estimation of effects within individual unitsindividual units
Hypotheses testing about cross-level Hypotheses testing about cross-level effectseffects
Partitioning of variance and covariance Partitioning of variance and covariance components among levelscomponents among levels
Overview of HLM and MLwiNOverview of HLM and MLwiN
HLMHLM Under development Under development
since mid 1980’ssince mid 1980’s First window version First window version
came out in 1997came out in 1997 Version 6 in Version 6 in
September 2004September 2004 Run on WindowsRun on Windows
95/98/NT/Me/2000/XP95/98/NT/Me/2000/XP Minimum 2 MB of Minimum 2 MB of
RAM and 2 MB of disk RAM and 2 MB of disk spacespace
MLwiNMLwiN Based on MLnBased on MLn First released in 1997First released in 1997 Version 2 in 2004Version 2 in 2004 Run on Windows Run on Windows
95/98/NT/Me/2000/XP95/98/NT/Me/2000/XP 32 Mb of Ram or more32 Mb of Ram or more A hard disk with at A hard disk with at
least 20MB of least 20MB of available spaceavailable space
ContinuedContinued
HLMHLM Graphical interfaceGraphical interface Continuous outcomeContinuous outcome Binary, count outcomeBinary, count outcome Multivariate outcome Multivariate outcome
variablesvariables Cross-classified dataCross-classified data Sample weightsSample weights Number of levels: 3Number of levels: 3
MLwiNMLwiN Graphical interfaceGraphical interface Continuous outcomeContinuous outcome Binary, count outcomeBinary, count outcome Multivariate outcome Multivariate outcome
variablesvariables Cross-classified dataCross-classified data Sample weightsSample weights Number of levels: can Number of levels: can
be many (default is 5)be many (default is 5)
Data Format for Multilevel AnalysisData Format for Multilevel Analysis
Inputting Data Inputting Data
HLMHLM Use a level-1 data set and Use a level-1 data set and
a level-2 data set for a level-2 data set for creating an .mdm file creating an .mdm file (mdmt stands for multivariate data (mdmt stands for multivariate data matrix)matrix)
Read SAS, SPSS, STATA Read SAS, SPSS, STATA and SYSTAT files directlyand SYSTAT files directly
Built-in Stat/transfer for Built-in Stat/transfer for many different data typesmany different data types
Use mdm file for Use mdm file for computation, very efficientcomputation, very efficient
Use raw data sets for Use raw data sets for graphicsgraphics
MLwiNMLwiN One single file One single file ASCII fileASCII file Native MLwiN format Native MLwiN format
(.ws extension)(.ws extension) Stata2mlwin program Stata2mlwin program
for stata usersfor stata users Set-up the size of Set-up the size of
worksheet (memory worksheet (memory control)control)
Data Management Data Management
HLMHLM Length of a variable name Length of a variable name
is 8is 8 No data managementNo data management Predictor variables can be Predictor variables can be
either grand-mean either grand-mean centered or group-mean centered or group-mean centeredcentered
Cross-level interaction is Cross-level interaction is naturally built naturally built
Summary statistics created Summary statistics created when .mdm file is createdwhen .mdm file is created
MLwiNMLwiN Can create new variablesCan create new variables Categorical variables can Categorical variables can
be dummied automaticallybe dummied automatically Summary statisticsSummary statistics Cross-level interaction Cross-level interaction
variable has to be created variable has to be created before building up a modelbefore building up a model
HLM: Multilevel Model ApproachHLM: Multilevel Model Approach
MLwiN: Mixed Model ApproachMLwiN: Mixed Model Approach
Output From HLMOutput From HLM
Output from MLwiNOutput from MLwiN
Graphics for Exploring Data: HLMGraphics for Exploring Data: HLM(Data-based graphs): line plots, scatter plots, and box plots(Data-based graphs): line plots, scatter plots, and box plots
0 12.00-3.12
4.54
12.19
19.84
27.49
MA
TH
AC
H
SECTOR = 0SECTOR = 1
-4.22
3.43
11.08
18.73
26.38
MA
TH
AC
H
-1.82 -0.94 -0.07 0.80 1.67
SES
SECTOR = 0
SECTOR = 1
Graphs for Exploring the Model: HLMGraphs for Exploring the Model: HLM (Model-based graphs) (Model-based graphs)
6.82
10.33
13.85
17.37
20.89
INT
ER
CE
PT
0 3.00 6.00 9.00 12.00
MEANSES: lowerMEANSES: mid 50%MEANSES: upper
5.65
9.59
13.53
17.46
21.40M
AT
HA
CH
-3.00 -1.66 -0.32 1.03
SES
MEANSES: lower halfMEANSES: upper half
Graphics for Exploring Data: MLwiNGraphics for Exploring Data: MLwiN
Graphs for Exploring the Model: MLwiNGraphs for Exploring the Model: MLwiN (Model-based graphs) (Model-based graphs)
Reference and Site(s)Reference and Site(s)Ming Yang, Ming Yang, Review of HLM 5.04 for Windows: Review of HLM 5.04 for Windows: http://multilevel.ioe.ac.uk/softrev/reviewhlm5.pdfhttp://multilevel.ioe.ac.uk/softrev/reviewhlm5.pdfAndy Jones, A review of random effects models in Andy Jones, A review of random effects models in MLwiN (version 2.0): MLwiN (version 2.0): http://multilevel.ioe.ac.uk/softrev/reviewmlwin.pdfhttp://multilevel.ioe.ac.uk/softrev/reviewmlwin.pdfMLwiN 2 user’s manualMLwiN 2 user’s manual: : http://multilevel.ioe.ac.uk/download/userman20.pdfhttp://multilevel.ioe.ac.uk/download/userman20.pdfGoldstein, Goldstein, Tutorial in Biostatistics Multilevel modeling of Tutorial in Biostatistics Multilevel modeling of medical datamedical datahttp://media.wiley.com/product_data/excerpt/http://media.wiley.com/product_data/excerpt/08/04700237/0470023708.pdf08/04700237/0470023708.pdfSinger and WillettSinger and Willett: Applied Longitudinal Data Analysis: : Applied Longitudinal Data Analysis: Modeling Change and Event Occurrence: Modeling Change and Event Occurrence: http://gseacademic.harvard.edu/~alda/http://gseacademic.harvard.edu/~alda/http://www.ats.ucla.edu/stat/http://www.ats.ucla.edu/stat/