W9: LMM Part 2 Flashcards

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
Q

What fixed and random components are in this model:
lmer(dStress ~ Benergy + Wenergy +
(Wenergy | ID)

A
  • Fixed effect of Benergy
  • Fixed effect of Wenergy
  • Random intercept (provided by default in R)
  • Random slope / effect of Wenergy
26
Q

What variables should you calculate ICC for in this model:
lmer(dStress ~ Benergy + Wenergy +
(Wenergy | ID)

A
  1. dStress
    iccMixed(“dStress”,id=”ID”,data=dm)
  2. dEnergy
    iccMixed(“dEnergy”, id =”ID”, data=dm)
27
Q

For this model:
lmer(dStress ~ Benergy + Wenergy +
(Wenergy | ID)
What does the Std. Dev. of random Wenergy from output show?

A
  • 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
Q

How do you interpret a significant fixed effect of Wenergy on stress?
On days where people had 1 unit higher energy than…

A

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
Q

What do convergence warnings mean

A

Computer was unable to identify optimal estimates for model

30
Q

What do singularity warnings mean and often directed at?

A
  • Almost always in random effects
  • Means you either have very similar variables included / there’s not enough observations per person for stable estimation
31
Q

What are 3 solutions to solve for singularity / convergence issues?

A
  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
Q

What are marginal effects?

A

Based on averages (i.e fixed effect portion of model)
Can be made for new data (plug in b0 and b1)

33
Q

What are conditional effects?

A

Both fixed and random effects of model
Predictions can only be made for existing data

34
Q

How many regression lines do you expect from modelling marginal effects?

A

1 (fixed average for everyone)

35
Q

When graphing conditional effects, what argument do you need to add to separate effect by unit (person)?

A

by = “ID”
breaks = c (10, 35, 69, 101) specifies which IDs you want to graph

36
Q

When graphing conditional effects, what argument do you have to add to specify a predictor is a random effect?

A

re.form = ~ (Wenergy | ID)

37
Q

The regression lines plotted from conditional effects graph are conditional predictions. This means what is included?

A

Shrinkage (of random intercept and slope to overall sample’s average intercept and slope)

38
Q

When graphing conditional effects (multiple regression lines), the function overlay = TRUE allows for what?

A

Display of all IDs’ regression lines

39
Q

When graphing conditional effects, and you want to only graph random intercepts only, what function do you use?

A

re.form = ~ (1 | ID)
Regression lines will all have same slopes but different intercepts

40
Q

When graphing conditional effects and we leave out the re.form argument completely, what do we get as output?

A

The marginal intercept + slope (identical for all IDs)
I.e fixed effect portion of the model

41
Q

Adding a random slope means there are how many random effects?

A

2 (slope + LMMs always have a random intercept)

42
Q

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?

A

Closer

43
Q

Is std.error larger and p-value higher (less significant) for models with fixed and random effects or model with fixed effects only?

A

Models with fixed and random effects