11 - linear mixed effects model

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play

1/11

encourage image

There are no tags or description

Looks like no tags are added yet.

12 Terms

1
New cards

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.

2
New cards

what is a hierarchy?

3
New cards

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

4
New cards

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

5
New cards

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

6
New cards

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

7
New cards

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

8
New cards

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*

9
New cards

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

10
New cards

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)

11
New cards

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!

12
New cards

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!