Download - General Linear Model
![Page 1: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/1.jpg)
GeneralLinear Model
GeneralizedLinear Model
GeneralizedLinearMixed Model
![Page 2: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/2.jpg)
GeneralLinear Model
GeneralizedLinear Model
GeneralizedLinearMixed Model
![Page 3: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/3.jpg)
GLMM
LMM
LMEM
HLM
GeneralizedLinearMixed Model
MultilevelModel
![Page 4: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/4.jpg)
![Page 5: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/5.jpg)
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.
![Page 6: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/6.jpg)
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)
![Page 7: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/7.jpg)
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
![Page 8: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/8.jpg)
response ~ intercept + slope * fixed effect + error
The Linear Model
structural partsystematic
partdeterministic
part
probabilistic part
stochastic partrandom part
![Page 9: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/9.jpg)
response ~ intercept + slope * fixed effect + error
structural partsystematic
partdeterministic
part
probabilistic part
stochastic part
random part
The Linear Mixed Effects Model
![Page 10: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/10.jpg)
Important terminology
- 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
Fixed effectRandom effect
“Fixed-effects factors are those in which the populations to which we wish to generalize are precisely the levels represented in our
analysis.”
assumed to be constantacross experimentsStructural
PartStochastic
Part
![Page 11: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/11.jpg)
Crawley (2013: 681)
![Page 12: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/12.jpg)
Subjects as a fixed effect?
NO… why:
not repeatable not systematic often, not of interest small subset of population
![Page 13: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/13.jpg)
Repetitions as a fixed effect?
Yes… why:
repeatable systematic[ often, not of interest] “exhausts the population”
![Page 14: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/14.jpg)
Rep 1
Rep 2
Rep 3
Item #1
Subject
Common experimental data
Item...
Item...
![Page 15: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/15.jpg)
German
French
English
Spanish Italian
Swedish
NorwegianFinnish
Hungarian
Turkish
Romanian
![Page 16: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/16.jpg)
library(lme4)lmer(y ~ x + (1|subject), mydata)
In R:
![Page 17: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/17.jpg)
![Page 18: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/18.jpg)
Random interceptsversus
Random slopes
![Page 19: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/19.jpg)
RT (m
s)
Subjects
Random intercepts
![Page 20: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/20.jpg)
Random slopes
![Page 21: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/21.jpg)
Experiment time
RT (m
s)
Randomintercepts
![Page 22: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/22.jpg)
Experiment time
RT (m
s)
Randominterceptsand slopes
![Page 23: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/23.jpg)
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)
![Page 24: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/24.jpg)
http://anythingbutrbitrary.blogspot.com/2012/06/random-regression-coefficients-using.html
![Page 25: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/25.jpg)
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)
![Page 26: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/26.jpg)
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
![Page 27: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/27.jpg)
An example
RT ~
![Page 28: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/28.jpg)
An example
RT ~ Condition+ (1|Subject)
![Page 29: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/29.jpg)
An example
RT ~ Condition ++ (1+Condition|Subject)
![Page 30: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/30.jpg)
An example
RT ~ Condition ++ (1+Condition|Subject)+ (1|Item)
![Page 31: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/31.jpg)
An example
RT ~ Condition ++ (1+Condition|Subject)+ (1+Condition|Item)
![Page 32: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/32.jpg)
An example
RT ~ Condition + TrialOrder ++ (1+Condition|Subject)+ (1+Condition|Item)
![Page 33: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/33.jpg)
An example
RT ~ Condition + TrialOrder ++ (1+Condition+
TrialOrder|Subject)+ (1+Condition|Item)
![Page 34: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/34.jpg)
Model specificationfor random effects
(1|subject)random intercept
(0+fixedeffect|subject) random slope
(1+fixedeffect|subject) … with correlation
term
![Page 35: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/35.jpg)
Assumptions
Absence ofCollinearity
Normality of Errors
Homoskedasticity of Errors
No influentialdata points
Independence
![Page 36: General Linear Model](https://reader036.vdocuments.net/reader036/viewer/2022062316/56816711550346895ddb7a44/html5/thumbnails/36.jpg)