mixing it up with random effects
play

Mixing it up with random effects Joshua Loftus Mixed models Intro - PowerPoint PPT Presentation

Mixed models Mixing it up with random effects Joshua Loftus Mixed models Intro to mixed models What is a mixed model? For simplicity well only talk about linear models. Mixed GLS y = X + Zb + , Cov( y ) = , b , and are all


  1. Mixed models Mixing it up with random effects Joshua Loftus

  2. Mixed models Intro to mixed models What is a mixed model? For simplicity we’ll only talk about linear models. Mixed GLS y = X β + Zb + ǫ, Cov( y ) = Σ β , b , and ǫ are all unobserved β is a vector of parameters b is a vector of random variables ǫ error with E( ǫ ) = 0, Cov( b , ǫ ) = 0 Inference about ( β, Σ) from conditional distribution y | b

  3. Mixed models Intro to mixed models Examples Mixed GLS y = X β + Zb + ǫ, Cov( y ) = Σ “Random slopes and intercepts” Error is not i.i.d. / Clustered errors Test scores of students, school effect, teacher effect Assume b ∼ N (0 , σ 2 T I ). What if σ 2 T is large? Small? What if there are only a handful of teachers in the study? Repeated measures / Longitudinal, e.g. gene ∼ drug * time

  4. Mixed models Intro to mixed models Fitting the model If Var( b ) = D and Var( ǫ ) = R then Var( y ) = R + ZDZ T R , D , and maybe even Z are functions of another parameter θ (“variance components”) Often reasonable to assume multivariate normality of y | b Maximum likelihood estimation of θ based on L ( θ, β ; y ) does not account for loss in degrees of freedom caused by estimating β . Analogous to ˆ σ/ n vs. ˆ σ/ ( n − p ) REML based on “residual” of y (residual contrasts) REML coincides with ANOVA for balanced designs

  5. Mixed models Intro to mixed models Fitting mixed models in R with lme4 Examples using the lme4 package in R pitch ∼ gender + (1 | subject) + (1 | scenario) price ∼ time + (time | product) participation ∼ extroversion + (1 | school/class) Read more (these links were also in the email I sent earlier) http://cran.r-project.org/web/packages/lme4/ vignettes/lmer.pdf http://cran.r-project.org/web/packages/lme4/lme4.pdf

  6. Mixed models Intro to mixed models Formulas in lme4

  7. Mixed models Intro to mixed models Discussion Questions? More examples: fixed effects vs. random effects Next topic? Time series Bootstrap Multiple comparisons + selective inference Causal inference Missingness / data cleaning / etc Bonus session on basic stats?

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend