multilevel modeling using hlm and mlwin xiao chen ucla academic technology services

18
Multilevel Modeling Multilevel Modeling Using HLM and MLwiN Using HLM and MLwiN Xiao Chen Xiao Chen UCLA UCLA Academic Technology Academic Technology Services Services

Upload: gervase-johns

Post on 11-Jan-2016

213 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Multilevel Modeling Using HLM and MLwiN Xiao Chen UCLA Academic Technology Services

Multilevel Modeling Multilevel Modeling Using HLM and MLwiNUsing HLM and MLwiN

Xiao ChenXiao Chen

UCLA UCLA

Academic Technology ServicesAcademic Technology Services

Page 2: Multilevel Modeling Using HLM and MLwiN Xiao Chen UCLA Academic 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

Page 3: Multilevel Modeling Using HLM and MLwiN Xiao Chen UCLA Academic Technology Services

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

Page 4: Multilevel Modeling Using HLM and MLwiN Xiao Chen UCLA Academic Technology Services

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

Page 5: Multilevel Modeling Using HLM and MLwiN Xiao Chen UCLA Academic Technology Services

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

Page 6: Multilevel Modeling Using HLM and MLwiN Xiao Chen UCLA Academic Technology Services

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)

Page 7: Multilevel Modeling Using HLM and MLwiN Xiao Chen UCLA Academic Technology Services

Data Format for Multilevel AnalysisData Format for Multilevel Analysis

Page 8: Multilevel Modeling Using HLM and MLwiN Xiao Chen UCLA Academic Technology Services

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)

Page 9: Multilevel Modeling Using HLM and MLwiN Xiao Chen UCLA Academic Technology Services

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

Page 10: Multilevel Modeling Using HLM and MLwiN Xiao Chen UCLA Academic Technology Services

HLM: Multilevel Model ApproachHLM: Multilevel Model Approach

Page 11: Multilevel Modeling Using HLM and MLwiN Xiao Chen UCLA Academic Technology Services

MLwiN: Mixed Model ApproachMLwiN: Mixed Model Approach

Page 12: Multilevel Modeling Using HLM and MLwiN Xiao Chen UCLA Academic Technology Services

Output From HLMOutput From HLM

Page 13: Multilevel Modeling Using HLM and MLwiN Xiao Chen UCLA Academic Technology Services

Output from MLwiNOutput from MLwiN

Page 14: Multilevel Modeling Using HLM and MLwiN Xiao Chen UCLA Academic Technology Services

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

Page 15: Multilevel Modeling Using HLM and MLwiN Xiao Chen UCLA Academic Technology Services

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

Page 16: Multilevel Modeling Using HLM and MLwiN Xiao Chen UCLA Academic Technology Services

Graphics for Exploring Data: MLwiNGraphics for Exploring Data: MLwiN

Page 17: Multilevel Modeling Using HLM and MLwiN Xiao Chen UCLA Academic Technology Services

Graphs for Exploring the Model: MLwiNGraphs for Exploring the Model: MLwiN (Model-based graphs) (Model-based graphs)

Page 18: Multilevel Modeling Using HLM and MLwiN Xiao Chen UCLA Academic Technology Services

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/