Presentation is loading. Please wait.

Presentation is loading. Please wait.

{ Multilevel Modeling using Stata Andrew Hicks CCPR Statistics and Methods Core Workshop based on the book: Multilevel and Longitudinal Modeling Using.

Similar presentations


Presentation on theme: "{ Multilevel Modeling using Stata Andrew Hicks CCPR Statistics and Methods Core Workshop based on the book: Multilevel and Longitudinal Modeling Using."— Presentation transcript:

1 { Multilevel Modeling using Stata Andrew Hicks CCPR Statistics and Methods Core Workshop based on the book: Multilevel and Longitudinal Modeling Using Stata (Second Edition) by Sophia Rabe-Hesketh Anders Skrondal

2

3 Within-Subject Dependence Within-Subject Dependence: We can predict occasion 2 measurement if we know the subject’s occasion 1 measurement. Between-Subject Heterogeneity: Large differences between subjects (compare subjects 9 and 15) Within-subject dependence is due to between-subject heterogeneity

4 Standard Regression Model Measurement of subject i on occasion j Population Mean Residuals (error terms) Independent over subjects and occasions Clearly ignores information about within-subject dependence

5 Variance Component Model Within-subject residual: deviation of observation i from subject j’s mean

6 Variance Component Model Within-subject residual: deviation of observation i from subject j’s mean

7 Variance Component Model Within-subject residual: deviation of observation i from subject j’s mean

8 Variance Component Model

9 Proportion of Total Variance due to subject differences: Intraclass Correlation: within cluster correlation

10

11 Random or Fixed Effect? What if we want to fix our model so that each effect is for a specific subject? Then we would use a fixed effect model:.xtreg wm, fe

12 Random or Fixed Effect? random effect model: if the interest concerns the population of clusters “generalize the potential effect” i.e. nurse giving the drug fixed effect model: if we are interest in the “effect” of the specific clusters in a particular dataset “replicable in life” i.e. the actual drug

13 Random Intercept Model with Covariates without covariates:

14 Random Intercept Model with Covariates with covariates:

15

16 Ecological Fallacy occurs when between-cluster relationships differ substantially from within-cluster relationships. Can be caused by cluster-lever confounding For example, mothers who smoke during pregnancy may also adopt other behaviors such as drinking and poor nutritional intake, or have lower socioeconomic status and be less educated. These variables adversely affect birthweight and have not be adequately controlled for. In these cases the covariate is correlated with the error term. (endogeneity) Because of this, the between-effect may be an overestimate of the true effect. In contrast, for within-effects each mother serves as her own control, so within mother estimates may be closer to the true causal effect.

17 How to test for endogeneity?

18 Random-coefficient model We’ve already considered random intercept models where the intercept is allowed to vary over clusters after controlling for covariates. What if we would also like the coefficients (or slopes) to vary across clusters? Models the involve both random intercepts and random slopes are called Random Coefficient Models

19 Random-coefficient model Random Intercept Model: Random Coefficient Model: cluster-specific random intercept cluster-specific random slope


Download ppt "{ Multilevel Modeling using Stata Andrew Hicks CCPR Statistics and Methods Core Workshop based on the book: Multilevel and Longitudinal Modeling Using."

Similar presentations


Ads by Google