Logistic regression
1. Check variables (weird cases) & explore data
a. Tab var
b. Summarize
2. Run logit and logistic and interpret variables and coefficients
a. Odds ratio:
>1: positive effect
<1: negative effect
Interpretation: increase of the predictor by 1 leads to increase in odds of outcome
variable by the percentage of the odds ratio
b. To get a better idea of the size of the effects, use:
Margins i.var (for categorical)
Or: margins, at(var = (value value value value)) (for continuous)
Possibly also use marginsplot for visualization
3. Use estat class for percentages
4. To find the right cut-off value (sensitivity):
lsens
See effect:
estat class, cutoff(value)
5. Assumption checking
6. Transformations
a. Ladder
i. Non-significant = possible transformation
b. Fracpoly: logit outcome predictor predictor predictor
c. Or (for one var): fracpoly <predictor1>: logit outcome <predictor1> predictor
predictor
d. Fracplot (to see shape of effect)
7. Interactions
a. qi predictor predictor predictor: logit outcome @
b. interact var var, gen(varxvar)
To create an interaction variable with automatically centred variables