370 likes | 886 Views
General Linear Model. Generalized Linear Model. Generalized Linear Mixed Model. General Linear Model. Generalized Linear Model. Generalized Linear Mixed Model. GLMM. LMM. Generalized Linear Mixed Model. LMEM. HLM. Multilevel Model. Tagliamonte & Baayen (2012 : 7 of preprint).
E N D
General Linear Model Generalized Linear Model GeneralizedLinearMixed Model
General Linear Model Generalized Linear Model GeneralizedLinearMixed Model
GLMM LMM GeneralizedLinearMixed Model LMEM HLM MultilevelModel
Tagliamonte& Baayen(2012: 7 of preprint) Tagliamonte, S. A., & Baayen, R. H. (2012). Models, forests, and trees of York English: Was/were variation as a case study for statistical practice. Language Variation and Change, 24(02), 135-178.
The Beauty of Mixed Models • Account for clusters without averaging • Different distributions (generalized LMM) • Interpretation at the trial-level • Everything in one model • Excellent for individual differences studies (cf. Drager & Hay, 2012; Dan Mirman’s work) More Power!! (see e.g., Barr et al., 2013)
Problems of Mixed Models • Issues surrounding p-values • People misuse them … in a way that doesn’t improve Type I error rate(Schielzeth & Forstmeier, 2009; Barr et al., 2013) • Sometimes take A LOT of time • Some models don’t converge
The Linear Model response ~ intercept + slope * fixed effect + error structural partsystematic partdeterministic part probabilistic part stochastic partrandom part
The Linear Mixed Effects Model response ~ intercept + slope * fixed effect + error structural partsystematic partdeterministic part probabilistic part stochastic partrandom part
Important terminology assumed to be constantacross experiments StructuralPart StochasticPart “Fixed-effects factors are those in which the populations to which we wish to generalize are precisely the levels represented in our analysis.” Fixed effect Random effect - repeatable - non-repeatable - systematic influence - random influence - exhaust the population- sample the population - generally of interest - often not of interest - can be continuous - have to be categorical or categorical
Subjects as a fixed effect? NO… why: not repeatable not systematic often, not of interest small subset of population
Repetitions as a fixed effect? Yes… why: repeatable systematic [ often, not of interest] “exhausts the population”
Common experimental data Subject Item... Item #1 Item... Rep 1 Rep 3 Rep 2
Finnish Norwegian Swedish English German Hungarian French Romanian Italian Spanish Turkish
In R: library(lme4) lmer(y ~ x + (1|subject), mydata)
Random intercepts versus Random slopes
Random intercepts RT (ms) Subjects
Randomintercepts RT (ms) Experiment time
Randominterceptsand slopes RT (ms) Experiment time
Random intercept vs. slope models Random intercept model = the fixed effect is evaluated against an error term that captures subject- or item-specific variability in the response Random slope model = the fixed effect is evaluated against an error term that captures subject- or item-specific variability in how the fixed effect affects the response In R: (1|subject) In R: (1+pred|subject)
http://anythingbutrbitrary.blogspot.com/2012/06/random-regression-coefficients-using.htmlhttp://anythingbutrbitrary.blogspot.com/2012/06/random-regression-coefficients-using.html
Random intercept examples • Some people are fast responders, some people are slow responders (their “intercepts” for response time are different) • Some people are very sensitive / accurate listeners, some are less sensitive (their “intercepts” for accuracy are different) • Some people have high or low voices with respect to their gender (their “intercepts” for pitch are different)
Random slope examples • Some people speed up during a long experiment,some slow down • Some people become more accurate during a long experiment, some less • Some people raise their pitch more for focus than others
An example RT ~
An example RT ~ Condition + (1|Subject)
An example RT ~ Condition + + (1+Condition|Subject)
An example RT ~ Condition + + (1+Condition|Subject) + (1|Item)
An example RT ~ Condition + + (1+Condition|Subject) + (1+Condition|Item)
An example RT ~ Condition + TrialOrder + + (1+Condition|Subject) + (1+Condition|Item)
An example RT ~ Condition + TrialOrder + + (1+Condition+TrialOrder|Subject) + (1+Condition|Item)
Model specificationfor random effects (1|subject) random intercept (0+fixedeffect|subject) random slope (1+fixedeffect|subject) … with correlation term
Assumptions Absence ofCollinearity No influentialdata points Normality of Errors Homoskedasticity of Errors Independence