W9: LMM Part 2 Flashcards

(43 cards)

1
Q

What are 2 random effects you can include in a LMM?

A

Random intercept
Random slope

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What distribution does 1 random effect assume to follow and what are the parameters of that distribution?

A

Normal distribution
1. Mean (across all participants, equivalent to fixed effect)
2. Standard deviation (how much the effect varies by person / variance)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is variance?

A

How much 1 variable varies within the sample/population

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is covariance?

A

How much 2 or more variables vary together in the same direction
Only shows DIRECTION (pos / neg), not strength so it’s unstandardized correlation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is correlation?

A

Change in 1 variable = change in another variable
Same (shows) direction AND strength (how close data is to line of best fit)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What distribution do we assume more than 1 random effects follow?

A

Multivariate normal distribution (MVD)
- All distributed normally together
Each random effect follows a univariate normal distribution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Does univariate normal distribution imply MVN?

A

No

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Does MVN imply univariate distribution?

A

Yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

If we assume random effects are uncorrelated, what do we set the covariance / correlation of them to?

A

0, i.e follow MVN distribution (each effect have their own distribution)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

In an intercept only model, people with more observations/data, will they have BLUPs closer/further to the observed mean of their own data?

A

Closer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Can we get BLUPs for random slopes and intercepts?

A

Yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does Mahalanobis distance (MD) evaluate?

A

If LMMs with multiple random effects follow MVN distribution and identify multivariate outliers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does the Mahalanobis Distance (MD) measure?

A

Distance between a point and a space defined by (vector of means, covariance matrix (variance))

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What distribution do the calaculated MDs for each row of data follow?

A

Chi-squared distribution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What do the degrees of freedom from chi-square distribution of MD equal to?

A

Number of dimensions (p)
df = p if raw data follow MVN

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How can we tell if data are MVN from calculating Mahalanobis distance?

A

It MD follows / matches a chi-squared distribution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What fixed and random components are in this model:
lmer(dStress ~ dEnergy + (1 + dEnergy | ID)
Are random effects correlated?

A
  • dEnergy as fixed effect
  • dEnergy as random slope/effect
  • Random intercept
    *Random slope + random intercept are correlated because they are in the same parenthesis
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What fixed and random components are in this model:
lmer(dStress ~ dEnergy + (1| ID) + (0 + dEnergy | ID) )

A
  • dEnergy as fixed effect
  • Random intercept
  • dEnergy as random slope / effect
  • Random intercept and random slope are NOT correlated (separate parantheses)
19
Q

For this model:
lmer(dStress ~ dEnergy + (dEnergy | ID) )
How do you interpret the correlation of -0.80 of the random slope of dEnergy in the output?

A

People who have higher level of stress when energy is 0 tend to have more negative slope of association between stress and energy

20
Q

For the positive correlation between intercept and slope:
People with higher intercept tend to incline faster / slower ?

A

Faster (more positive the intercept, more positive the slope)

21
Q

For the negative correlation between intercept and slope:
People with higher intercept tend to decline faster / slower?

A

Faster (more positive intercept = faster decline)
Prone to floor effects (e.g a more severe D symptoms = faster improvements than less severe D symptoms)

22
Q

From plot(modelDiagnositics()) output, what does the graph titled “ID : MV Normal” evaluate?

A

Whether random effects (slope and intercept) by ID follow MVN using Mahalanobis distance.
Compared against chi-squared distribution (dotted black line)

23
Q

What function do you use to identify observable EVs from modelDiagnostics plots?

A

md.plot$extremeValues

24
Q

What are 3 ways to remove EVs?

A
  1. Remove 1 at a time
    dm[-unique(m1.diag$extremeValues$Index)]
  2. Remove extreme residuals (i.e selected IDs)
    dm[ID %nin% c(23, 109, 143)]
  3. Remove selected effect type
    dm[-unique(m1.diag$extremeValues
    [EffectType == “Multivariate Random Effect ID”]$Index)
25
What fixed and random components are in this model: lmer(dStress ~ Benergy + Wenergy + (Wenergy | ID)
* Fixed effect of Benergy * Fixed effect of Wenergy * Random intercept (provided by default in R) * Random slope / effect of Wenergy
26
What variables should you calculate ICC for in this model: lmer(dStress ~ Benergy + Wenergy + (Wenergy | ID)
1. dStress iccMixed("dStress",id="ID",data=dm) 2. dEnergy iccMixed("dEnergy", id ="ID", data=dm)
27
For this model: lmer(dStress ~ Benergy + Wenergy + (Wenergy | ID) What does the Std. Dev. of random Wenergy from output show?
* Individual differences in Wenergy scores. * If random slopes (Wenergy) assumed to follow normal distribution, expected to fall between estimate of fixed Wenergy +/- Std. Dev. of random Wenergy
28
How do you interpret a significant fixed effect of Wenergy on stress? On days where people had 1 unit higher energy than…
On days where people had 1 unit higher energy than their own average, people were expected to have x higher/lower stress that SAME day on average.
29
What do convergence warnings mean
Computer was unable to identify optimal estimates for model
30
What do singularity warnings mean and often directed at?
* Almost always in random effects * Means you either have very similar variables included / there's not enough observations per person for stable estimation
31
What are 3 solutions to solve for singularity / convergence issues?
1. Remove random effect (always keep random intercept so random slopes) 2. Assume correlation between random slope and intercept = 0 3. Use a different optimizer lmerControl() lmer (... control = strictControl)
32
What are marginal effects?
Based on averages (i.e fixed effect portion of model) Can be made for new data (plug in b0 and b1)
33
What are conditional effects?
Both fixed and random effects of model Predictions can only be made for existing data
34
How many regression lines do you expect from modelling marginal effects?
1 (fixed average for everyone)
35
When graphing conditional effects, what argument do you need to add to separate effect by unit (person)?
by = "ID" breaks = c (10, 35, 69, 101) specifies which IDs you want to graph
36
When graphing conditional effects, what argument do you have to add to specify a predictor is a random effect?
re.form = ~ (Wenergy | ID)
37
The regression lines plotted from conditional effects graph are conditional predictions. This means what is included?
Shrinkage (of random intercept and slope to overall sample's average intercept and slope)
38
When graphing conditional effects (multiple regression lines), the function overlay = TRUE allows for what?
Display of all IDs' regression lines
39
When graphing conditional effects, and you want to only graph random intercepts only, what function do you use?
re.form = ~ (1 | ID) Regression lines will all have same slopes but different intercepts
40
When graphing conditional effects and we leave out the re.form argument completely, what do we get as output?
The marginal intercept + slope (identical for all IDs) I.e fixed effect portion of the model
41
Adding a random slope means there are how many random effects?
2 (slope + LMMs always have a random intercept)
42
In an intercept only model, will people with more data/observations will have BLUPs have closer or further to the observed mean of their own data?
Closer
43
Is std.error larger and p-value higher (less significant) for models with fixed and random effects or model with fixed effects only?
Models with fixed and random effects