W9: LMM Part 2 Flashcards
(43 cards)
What are 2 random effects you can include in a LMM?
Random intercept
Random slope
What distribution does 1 random effect assume to follow and what are the parameters of that distribution?
Normal distribution
1. Mean (across all participants, equivalent to fixed effect)
2. Standard deviation (how much the effect varies by person / variance)
What is variance?
How much 1 variable varies within the sample/population
What is covariance?
How much 2 or more variables vary together in the same direction
Only shows DIRECTION (pos / neg), not strength so it’s unstandardized correlation
What is correlation?
Change in 1 variable = change in another variable
Same (shows) direction AND strength (how close data is to line of best fit)
What distribution do we assume more than 1 random effects follow?
Multivariate normal distribution (MVD)
- All distributed normally together
Each random effect follows a univariate normal distribution
Does univariate normal distribution imply MVN?
No
Does MVN imply univariate distribution?
Yes
If we assume random effects are uncorrelated, what do we set the covariance / correlation of them to?
0, i.e follow MVN distribution (each effect have their own distribution)
In an intercept only model, people with more observations/data, will they have BLUPs closer/further to the observed mean of their own data?
Closer
Can we get BLUPs for random slopes and intercepts?
Yes
What does Mahalanobis distance (MD) evaluate?
If LMMs with multiple random effects follow MVN distribution and identify multivariate outliers
What does the Mahalanobis Distance (MD) measure?
Distance between a point and a space defined by (vector of means, covariance matrix (variance))
What distribution do the calaculated MDs for each row of data follow?
Chi-squared distribution
What do the degrees of freedom from chi-square distribution of MD equal to?
Number of dimensions (p)
df = p if raw data follow MVN
How can we tell if data are MVN from calculating Mahalanobis distance?
It MD follows / matches a chi-squared distribution
What fixed and random components are in this model:
lmer(dStress ~ dEnergy + (1 + dEnergy | ID)
Are random effects correlated?
- dEnergy as fixed effect
- dEnergy as random slope/effect
- Random intercept
*Random slope + random intercept are correlated because they are in the same parenthesis
What fixed and random components are in this model:
lmer(dStress ~ dEnergy + (1| ID) + (0 + dEnergy | ID) )
- dEnergy as fixed effect
- Random intercept
- dEnergy as random slope / effect
- Random intercept and random slope are NOT correlated (separate parantheses)
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?
People who have higher level of stress when energy is 0 tend to have more negative slope of association between stress and energy
For the positive correlation between intercept and slope:
People with higher intercept tend to incline faster / slower ?
Faster (more positive the intercept, more positive the slope)
For the negative correlation between intercept and slope:
People with higher intercept tend to decline faster / slower?
Faster (more positive intercept = faster decline)
Prone to floor effects (e.g a more severe D symptoms = faster improvements than less severe D symptoms)
From plot(modelDiagnositics()) output, what does the graph titled “ID : MV Normal” evaluate?
Whether random effects (slope and intercept) by ID follow MVN using Mahalanobis distance.
Compared against chi-squared distribution (dotted black line)
What function do you use to identify observable EVs from modelDiagnostics plots?
md.plot$extremeValues
What are 3 ways to remove EVs?
- Remove 1 at a time
dm[-unique(m1.diag$extremeValues$Index)] - Remove extreme residuals (i.e selected IDs)
dm[ID %nin% c(23, 109, 143)] - Remove selected effect type
dm[-unique(m1.diag$extremeValues
[EffectType == “Multivariate Random Effect ID”]$Index)