004_arizona_MM1

advertisement
General
Linear
Model
Generalized
Linear
Model
Generalized
Linear
Mixed
Model
General
Linear
Model
Generalized
Linear
Model
Generalized
Linear
Mixed
Model
GLMM
LMM
LMEM
HLM
Generalized
Linear
Mixed
Model
Multilevel
Model
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
structural part
systematic part
deterministic part
+
error
probabilistic part
stochastic part
random part
The Linear Mixed Effects Model
response ~ intercept + slope * fixed effect
structural part
systematic part
deterministic part
+
error
probabilistic part
stochastic part
random part
Important terminology
assumed to be constant
across experiments
Structural
Stochastic
“Fixed-effects factors are those inPart
which the
Part
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
or categorical
- have to be categorical
Crawley (2013: 681)
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 #1
Rep 1
Rep 3
Rep 2
Item
...
Item
...
Finnish
Norwegian
Swedish
English
French
Spanish
Germa
n
Hungarian
Romanian
Italian
Turkish
In R:
library(lme4)
lmer(y ~ x + (1|subject), mydata)
Random intercepts
versus
Random slopes
3000
2000
1000
RT (ms)
4000
Random intercepts
2
3
4
5
6
7
8
9
10
11
12
13
14
Subjects
15
16
17
18
19
20
21
22
23
Random
slopes
0 50 100150200
Subject
Subject
Subject
Subject
1400
1200
1000
800
600
400
Subject
Subject
Subject
RT
1400
1200
1000
800
600
400
Subject
Subject
Subject
Subject
Subject
Subject
Subject
Subject
Subject
Subject
1400
1200
1000
800
600
400
1400
1200
1000
800
600
400
Subject
Subject
Subject
Subject
Subject
1400
1200
1000
800
600
400
0 50 100150200
0 50 100150200
Block
0 50 100150200
RT (ms)
Random
intercepts
Experiment time
RT (ms)
Random
intercepts
and slopes
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
In R: (1|subject)
In R: (1+pred|subject)
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
http://anythingbutrbitrary.blogspot.com/2012/06/ra
ndom-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 specification
for random effects
(1|subject)
random intercept
(0+fixedeffect|subject)
random slope
(1+fixedeffect|subject)
… with correlation
term
Assumptions
Absence of
Collinearity
No influential
data points
Normality of Errors
Homoskedasticity
of Errors
Independence
Download