Week 7 Linear Regression Flashcards
Why can’t we use a linear regression on repeated measure data (longtitudinal) or other data (clustered) with non-independent measures?
Because LR assumes observations are independent.
The LMM relaxes this assumption.
LR can only give fixed effects, which means regression coefficients are assumed to be the same for everyone (degree to which line slopes). Coefficients that differ person by person are random effects.
Linear regression can only give fixed effects meaning that it assumes all participants have the same mean.
But we know different participants have different means - the means are the random variable.
Why do we need to use a LMM instead of a LR or GLM on repeated measures or other data?
To capture individual differences in level of each line (different intercepts), different relationships between predictor and outcome (different slopes)
[aka include regression coefficients that are both identical for everyone and vary randomly for each participant]
Why does the LR model include a constant ( + 1) ?
Mean of residuals will be zero
Unbiased errors and fit regression line to find own intercept
Minimises mean squared error (the line of best fit that minimises the distances between the line and all the data points).
Minimises distances between line and all the data points
In the LR model if we made the 1 (the constant) zero, what would this mean?
We had no intercept. Which is bad at is leads to bias.
What are the assumptions of a linear regression?
all the values of the outcomes should come from a different person/observations. They should not be correlated with one another.
If we ignore this assumption on in non independent data, our SE, CI and p values would be bias.
Why does a fixed effect in a random intercept model show just one gradient of line?
because the regresion co efficients are assumed to be the same for everyone, so there is no indivdiual differences account for in variance.
In the fixed effect in a LR model, do we assume all participants have the same mean?
Yes.
In a random intercept fixed effect model, are the means assumed to be the same for all participants?
There are both fixed and random effects here, as a random intercept is an effect, so we assume participants have the same coefficent but different means for the random intercept.. maybe
What is this showing?
The RANDOM effect component in an equation for a random intercept model.
So you are allowed individual unit deviations
What is this showing? Each component of the equation for a random intercept model? And how mnay effects in this model?
Two.
So the first part
yij = the assumption the outcome follows a normal distribution
b0j = The random effect. Its the mean intercept (fixed effect) PLUS individual unit deviations from the mean are allowed for. That’s the random effect
1 = The constant capturing b naught. Doesn’t mean intercept is 1, but it’s just so the mean of your residuals is zero (which is the assumption in this model). Makes sure errors are unbiased and the regression line will be fit to find its own intercept. Fits by minimising square error, the line of best fit that minimises the distances between the line and all data points)
When you get the overall line of best fit of a model, what is this showing?
The overall variance of a model
So the extra parameter in a LMM is the standard deviation of the individual intercepts (in a random intercept model) that we have to estimate.
So if you get a question saying what do you need to estaimte in a random intercept model?
- The mean intercept (fixed effect) - this is standard for LR
- The standard deviations of the individual deviations
- And as always, the overall residual of the model