Logistic Regression Flashcards
(8 cards)
What does a logistic regression predict?
- log(odds(<outcome>)) = logit(<outcome>)</outcome></outcome>
- Remember that odds = probability / (1 – probability), which is the same as probability = odds / (odds +1)
*raw estimate from the model is on the logit scale
To get a more interpretable coefficient estimate for a logistic regression, what do we need to do?
- Exponentiate the coefficient (e^(estimate)) to get odds ratio for a one unit change in the coefficient
How do we assess model fit in a logistic regression?
1) ANOVA and likeihood ratio test to compare a model to a null model (or fit of two models)
2) Evaluate prediction quality:
-Nagelkerke’s R2 (just used from relative comparison) - Higher better
-Area under the curve (AUC or C statistic) (0.5-1) - Higher better
If only Dxy (Somers’ d) given - calculate C as 0.5 + 0.5(Dxy)
AUC tells predictive accuracy
-AIC and BIC - Lower better
How do we determine how well the model classifies subjects?
Confusion matrix
In a confusion matrix, how do you determine your prediction rule?
Default threshold is 0.5 but not always optimal. the role is base on predicted probabilities.
Chose based on what you care about more: Sensitivity, specificity, or balance
What measures do you get from a confusion matrix?
Sensitivity, Specificity, accuracy, positive predictive value and negative predictive value (precision)
How do we predict the logistic regression outcome in new data?
- Holdout sample in a train/test approach or validate with bootstrap approach
- Bootstrap (validate) approach will correct for over-optimism and produce validated R2 and C
What can an effect size plot show you for a logistic regression?
- Effect size plot can show OR for a change from 25th percentile to 75th percentile, change in values from a plot with non-linear terms, or comparison of a category to the reference category