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

## 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:

{ 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

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

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

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

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

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

Variance Component Model

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

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

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

Random Intercept Model with Covariates without covariates:

Random Intercept Model with Covariates with covariates:

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.

How to test for endogeneity?

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

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