Presentation is loading. Please wait.

Presentation is loading. Please wait.

School of Veterinary Medicine and Science Multilevel modelling Chris Hudson.

Similar presentations


Presentation on theme: "School of Veterinary Medicine and Science Multilevel modelling Chris Hudson."— Presentation transcript:

1 School of Veterinary Medicine and Science Multilevel modelling Chris Hudson

2 School of Veterinary Medicine and Science Regression models..with 1 predictor outcome predictor

3 School of Veterinary Medicine and Science Regression models y=0.06 + 0.31x..with 1 predictor

4 School of Veterinary Medicine and Science Regression models..with >1 predictor

5 School of Veterinary Medicine and Science More complex data structures In real life, things are often less simple! Are your “units” of data really independent? –Repeated measures within individuals –Pupils within schools –Individuals within households within neighbourhoods These are “multilevel” structures –e.g. pupils from the same school are more likely to be similar than pupils from different schools

6 School of Veterinary Medicine and Science A real example… Using a multilevel/hierarchical structure… 2d

7 School of Veterinary Medicine and Science A real example… Using a multilevel/hierarchical structure…

8 Why should we use multilevel models? Slides from www.bris.ac.uk/cmmwww.bris.ac.uk/cmm

9 How do we deal with this? Contextual analysis. Analysis individual-level data but include group-level predictors Problem: Assumes all group-level variance can be explained by group-level predictors; incorrect SE’s for group-level predictors Do pupils in single-sex school experience higher exam attainment? Structure: 4059 pupils in 65 schools Response: Normal score across all London pupils aged 16 Predictor: Girls and Boys School compared to Mixed school Parameter Single level Multilevel Intercept (Mixed school)-0.098 (0.021) -0.101 (0.070) Boy school 0.122 (0.049) 0.064 (0.149) Girl school 0.245 (0.034) 0.258 (0.117) Between school variance(  u 2 ) 0.155 (0.030) Between student variance (  e 2 ) 0.985 (0.022) 0.848 (0.019) Parameter Single level Intercept (Mixed school)-0.098 (0.021) Boy school 0.122 (0.049) Girl school 0.245 (0.034) Between school variance(  u 2 ) Between student variance (  e 2 ) 0.985 (0.022)

10 How do we deal with this? Analysis of covariance (fixed effects model). Include dummy variables for each and every group Problems What if number of groups very large, eg households? No single parameter assesses between group differences Cannot make inferences beyond groups in sample Cannot include group-level predictors as all degrees of freedom at the group-level have been consumed Target of inference: individual School versus schools

11 How do we deal with this? Fit single-level model but adjust standard errors for clustering (GEE approach) Problems: Treats groups as a nuisance rather than of substantive interest; no estimate of between-group variance; not extendible to more levels and complex heterogeneity Multilevel (random effects) model –Partition residual variance into between- and within-group (level 2 and level 1) components –Allows for un-observables at each level, corrects standard errors –Micro AND macro models analysed simultaneously –Avoids ecological fallacy and atomistic fallacy

12 School of Veterinary Medicine and Science ML models… 1.Account appropriately for clustering (even in complex structured data) 2.Allow inferences to be made about differences between levels (including generalisation to wider popluations) –cf treating this as a “nuisance”

13 School of Veterinary Medicine and Science Random effects Random intercepts –Each higher-level unit has a different intercept –These are assumed to come from a Normal distribution

14 School of Veterinary Medicine and Science Random effects Random slopes –It’s also possible to let the slope of each line vary between higher-level units…

15 School of Veterinary Medicine and Science An example…

16 School of Veterinary Medicine and Science Resources www.bris.ac.uk/cmm www.statmenthods.net


Download ppt "School of Veterinary Medicine and Science Multilevel modelling Chris Hudson."

Similar presentations


Ads by Google