1/11
Looks like no tags are added yet.
what is a linear mixed effects model
A method for dealing with data that has a āhierarchicalā structure
ā Also referred to as āmulti-levelā data
ā Models also referred to as āhierarchicalā, āmulti-levelā, ārandom effectsā, etc.
what is a hierarchy?
why are hierarchies important?
Similar to most reasons in classic statistics: error rates!
ā Specifically, ignoring certain aspects of hierarchies can inflate Type I Error
Rate
ā A bit different from within-subjects ANOVA vs. between (Type II Error Rate)
ā For example, take our previous example on statistics teaching
ā Letās say we ignore the potential differences between universities
ā We just treat the students as one huge sample that are independent samples
ā If students are not independent (i.e., thereās different teaching quality at
different universities), weāll be ignoring the fact that students are not truly
independent
ā Ignoring the effect of university can inflate our Type I Error Rate (i.e., weāll be
more likely to mistake an effect of university for an effect of teaching method)
ā The bigger the effect of university, the greater our inflation of Type I Error
Rate
how do we deal with hierarchies?
ncorporate them into our model!
ā The issues are caused by the assumptions of our model being wrong
ā Something that I discussed before for within-subjects ANOVA
ā Assumptions of LMM are a bit more implicit; that the model is well specified
(i.e., that weāre not ignoring important things), rather than the explicit ones in
ANOVA
ā We fix this by making our model right
ā We ensure that things that have an effect ā even if weāre not interested in
these effects ā are accounted for in our model
ā We do this by incorporating ārandom effectsā into our model
what is a random effect?
Well, letās contrast them to a ānon-random effectā:
ā This is a āfixed effectā
ā Fixed effects are usually things that are āfixedā by the researcher or the world
ā Theyāre also usually things that weāre interested in (but not always)
ā Think main effects and interactions in ANOVA
ā In our previous example, our āfixed effectā would be teaching method
ā In contrast, ārandom effectsā:
ā Usually things where weāre getting some random sample of a larger whole
ā Usually things that weāre not really interested in (but can be in some cases)
ā Think the āneutralā variance in within-subjects ANOVA
ā In our previous example, a key random effect might be university
what are the different types of random effects?
However, there are different ātypesā of random effects!
ā Random intercepts
ā Random slopes
ā The correlation between the types of random effects
ā Random intercepts youāre very familiar with
ā These are essentially the āneutralā variability in within-subjects ANOVA
ā Random slopes are tricky, but you have encountered them before
ā Theyāre in complex within-subjects ANOVA; I just didnāt explain them at the
time as theyāre⦠well, even more complex
what is a random intercept?
means that the variable makes a difference to
the DV
ā In our example: that universities differ in statistics exam scores
ā In experimental psychology, random effects are often about participants
ā In this case, it would be that individual differences exist
what is a random slope?
more complex
ā A random slope also involves a āfixed effectā (e.g., the main effect of an IV)
ā It means that the effect of the IV on the DV is different across the variable
ā In our example: that universities differ in their effect of teaching method
ā In experimental psychology, random effects are often about participants
ā In this case, it would be that individual differences exist *in the effect of the
IV*
what are multiple random effects?
can also have multiple types of random effects in your data/model
ā For example, in experimental psychology, we often have multiple people do a task
ā Participant random intercepts and by-participant random slopes
ā However, people often do multiple items, and sometimes the same items are done
by multiple people
ā For example, lexical decision tasks (i.e., āis this a word or non-word?ā)
ā In these cases, we can also have by-item random intercepts and by-item
random slopes
what is the cost of the randomness?
general, the recommendation is to use the āmaximal model justified by the
designā
ā Essentially, we should include all random effects that we think might be present, in
case they are present, because if theyāre present and we donāt include them, then
our Type I error rate will be inflated
ā However, the price of more randomness is more data!
ā We need sufficient data to separate random effects from residual (i.e., bad)
variability
ā If we donāt have sufficient data, we need to make the model simpler
To have āby-X random interceptsā, we need multiple measurements from X
ā For āby-participant random interceptsā, think about a within-subjects design
ā For āby-university random interceptsā, each method is used in each university
ā Rule of thumb: at least X (e.g., participants) of 5, but 20+ is preferable
ā To have āby-X random slopes across IVā, we need multiple measurements from X
in each level of the IV
ā For āby-participant random slopes across drink typeā, we need each person to
have multiple gaze duration measurements in each drink condition
ā For āby-university random slopes across methodā, we need each university to
have multiple students complete each method of teaching
ā No clear rule of thumb here, but could use similar to above (i.e., 20+
preferable)
what can you get out of mixed models?
All the standard stuff that you would get out of an ANOVA for the fixed-effects
ā Probably not surprising to you, as we did this for āwithin-subjects ANOVAā
ā However, this is not the limit of linear mixed models!
ā You can also get the estimates for random intercepts (i.e., how big are the
individual differences?) and/or see if they significantly improve the model
ā You can also get the estimates for the random slopes (i.e., how big are the
individual differences in the effect of the IV on the DV) and/or see if they
significantly improve the model
ā In Bayesian models, you can even make interesting constraints using priors
ā What weāll cover is very limited for simplicity!
summary
Hierarchies are everywhere, but they donāt need to be scary; we can deal with them
ā Ignoring certain aspects of hierarchies can lead to inflated Type I error rate
ā We can deal with hierarchies via linear mixed effects models (aka multi-level models)
ā Random intercepts allow for general āindividual differencesā between the samples of
the random variable (e.g., differences between participants)
ā Random slopes allow for āindividual differencesā between the samples of the random
variable in the effect of the IV on the DV (e.g., differences between participants in
how they change over conditions)
ā Participants are one of the most common random variables, but are not the only one
ā The price of these magical methods is more data, particularly for random slopes
ā You can use linear mixed effects models for a lot more than weāve covered today!