Logistic Regression II Flashcards
(60 cards)
What is logistic regression used for?
To model the relationship between multiple independent variables / m number of exposures (continuous or categorical) and a binary outcome (y)
What is the logistic regression equation?
ln ( π / 1−π ) = β0 + β1x1 + … βmxm
This equation models the log-odds of an event occurring. βm represents the effect of predictor m when all other predictors are considered
ln ( π / 1−π ) = log-odds or logit
ln ( π ) = natural logarithm of the probability
π / 1−π = odds
How do you obtain OR from a logistic regression coefficient?
OR = exp(β)
What are the key assumptions of a BLR?
- Observations are independent
- No multicollinearity among independent variables
- The outcome variable is binary
- No unobserved confounders
- The log-odds of the dependent variable are linearly related to continuous predictors
How do you interpret a logistic regression coefficient?
- A positive coefficient means the predictor increases the log-odds of the event occurring
- A negative coefficient means the predictor decreases the log-odds
What does a 95% CI for an OR tell you?
If the CI includes 1, the predictor is not statistically significant
What is the LRT used for?
To compare nested logistic regression models
What are the hypotheses for the LRT?
H0: The simpler model (without the extra parameter) is sufficient
H1: The more complex model (with the extra parameter) provides a better fit
How do you interpret the LRT p-value?
- If p < 0.05, reject H0 (favour the more complex model)
- If p > 0.05, do not reject H0 (favour the simpler model)
How do you compute predicted probabilities?
π = exp(β0 + β1x1 + … + βxmx) / 1 + exp(β0 + β1x1 + … + βmxm
What is an interaction effect?
An interaction occurs when the effect of one predictor on the outcome depends on the value of another predictor
How do you interpret predicted probabilities?
They indicate the probability of an event occurring for a given set of predictor values
How do you interpret an interaction term?
If the interaction term is significant, the relationship between a predictor and the outcome varies by the interacting variable
How is the interaction tested in logistic regression?
- Include an interaction term x1 x x2 in the model
- Use an LRT to compare models with and without the interaction
What is the Stata command for an interaction term?
logit <outcome> <i.predictor1##i.predictor2></outcome>
What is centring a continuous variable?
Subtracting the mean from each value to improve interaction
Why is centring useful in logistic regression?
It allows meaningful interpretation of interaction effects
How do you interpret the coefficient for each predictor in a multivariable model?
The effect of x1 adjusting for x2, … xm
What does the logit model give us and what does this mean for interpretation?
The log odds, but the OR is much better for interpretation
Even though the OR is easier to interpret, why should we still use the logit model?
We still need to know the function of the logit because the significance of the OR (z statistic) is derived from the SEs and the log odds. We also need to know the logit to use the probabilities from the model
How do we turn the equation for the log odds into the equation for the odds?
π / 1−π = exp(β0 + β1x1 + … + βmxm)
What are the mathematical steps for calculating probabilties?
- We model the log odds or logit of a probability π
- Which we turn into an equation for the odds
- Which we turn into an equation to calculate probabilities
What is the preferred method for presenting probabilities?
Use graphs as it’s more difficult to look at ORs in graphs
What model do we use to get the probabilities?
Logit