Cheatography

# Logistic Regression Review Cheat Sheet (DRAFT) by Chrish0204

Review of important logistic regression concepts

This is a draft cheat sheet. It is a work in progress and is not finished yet.

### Interp­ret­ation of Coeffi­cients

 Beta-0 - log(odds) when X1 = 0..., X-i = 0 - Often not intepr­etable (outside range of data) - Sometimes can be thought of as background odds Beta-1 - Difference in log(odds) for two groups differing in their level of X-1 by one unit, but otherwise similar for all other X-i (same as the log of the OR comparing these two groups) - Because of the properties of logoar­thms, beta-1 is also the log of the odds ratio for two groups differing in their level of X-1 by one unit, but otherwise similar for all other X-i - (beta-­1)(1) is the log odds ratio between two groups differing in X-1 by one unit, while (beta-­1)(5) is the log odds ratio between two groups differing in X-1 by five units e^beta-1 - Odds ratio for two groups differing in their level of X-1 by one unit, but otherwise agreeing in their level of all other X-i - Similarly: (beta-­1)(5) is the log(odds) between two groups different in their value of X-1 by 5, and e^(bet­a-1)(5) is the odds ratio between two such groups - (ebeta-1)(1) is OR comparing one unit apart, while (ebeta-1­)*(5) is OR comparing five units apart

### Intera­ction Terms

 - Relati­onship between X and Y is moderated through Z - This means the OR for Y between two groups that differ on X varies with Z log(od­ds(­Y|X,Z)) = beta-0 + beta-X(X) + beta-Z(Z) + beta-X­Z(X*Z) Coeffi­cient Interp­ret­ation - Beta-0 still log(odds) of Y, given all X-i are zero - Beta-X is difference in log(odds) of Y between two groups differing by one unit of X, when Z = 0 - Beta-Z is difference in log(odds) of Y between two groups differing by one unit of Z, when X = 0 - Possible that X and/or Z = 0 outside of range of data, but still need to include this Intera­ction Term - BetaXZ is change in slope per 1 unit difference in X, comparing 1 unit differ­ences in Z - e^beta­(in­ter­action) is ratio of the OR when intera­cting variable =1 compared to when intera­cting variable = 0 - "The intera­ction term is the difference in log(OR) comparing situations where the intera­cting variable differs by one unit." - Note that on the log scale, this is a differ­ence, whereas on the OR scale, it is a ratio

### Model Fitting

 - Model coeffi­cients estimated by achieving "­minimum devian­ce" - No general formula exists for this; software is needed to do this - The beta-hats identified through this process are called the maximum likelihood estimates (MLEs) of the true beta-0 and beta-1 Likelihood Theory - Provides tools for converting modeling assump­tions into SE estimates - Assumes that in popula­tion, Y and X really do have logistic relati­onship; however, can still get "best estima­tes­" with minimum deviance (just no SEs/CIs) Estimation Theory - Use robust estimates to obtain SEs/CIs of coeffi­cients in the model, even when true population is not a logistic relati­onship - Point estimates will be same as model-­based, but CIs are slightly different