# Logistic Regression and Normality Testing

I am a bit confused regarding normality testing for predictor variables in logistic regression.

Example - If I am looking at an older population, and two of the predictors are continuous, fasting blood glucose and high blood pressure, inherently as the population gets older, both endpoints tend to skew to the right. However, if I intend on stratifying each on three levels (high/pre/normal bp and hi/pre/normal diabetes), is it necessary to transform these variables to have a more normal distribution?

I am not sure if this is to improve the linearity of the logIT between the dependent and independent variable.

Any advice and guidance is greatly appreciated.

Thanks,

MP

• From what I have been reading, normality testing is not needed, however, other studies have mentioned normalizing data, but I think this is because the data points are so small that a transformation is needed. – M P. Mar 8 '17 at 16:50
• Logistic regression does not require residuals to follow a Normal distribution so testing for normality is not needed like it is in Linear regression. Normalizing your data may help if your data sees a wide variation in measurements (e.g. age ranges 0-80, income ranges 10000-90000) – Jon Mar 8 '17 at 16:52
• No linear or generalized linear model makes any assumptions about the distribution of the predictor variables. – Matthew Drury Mar 8 '17 at 16:53
• @Jon, I do have some data points with wide variations, biomarkers, which I tend on normalizing first. – M P. Mar 8 '17 at 17:37
• Do you mean that you will make blood pressure categorical rather than continuous? Isn't that just gratuitously discarding relevant information? – Michael Hardy Mar 8 '17 at 19:58

If normality is an assumption of your analysis (which as @Matthew Drury has pointed out is not true of linear or general linear models), then you should test for normality with by looking at a QQ-Plot, judging skew and kurtosis, and choosing a test of normality. In order of liberal to conservative tests of normality, you can choose from: Kolmogorov-Smirnov, Kolmogorov-Smirnov with Lilliefors correction, or Shapiro-Wilk. If the ocular test, skew, kurtosis, and statistical significance of the tests point to deviation from normality AND your analysis assumes normality, then a transformation can be applied.

"Traditional" transformations include: square root, log, inversion, reflection, and trigonometric. However, the Box-Cox series of transformations has two advantages over the others: 1) you can fine tune your transformations and 2) it applies easily to positively and negatively skewed distributions (whereas other transformations require a reflection and then a transformation for negatively skewed data).

Most transformations are based on raising data to a power and are thus power transformations. For example, a square root transformation is $x^{1/2}$. Why not use $x^{0.9}$? There's a continuum of transformations that lead to the best transformation. Box and Cox showed that there is a continuum of transformations:

$$y_i^\lambda=(y_i^\lambda-1)/\lambda, \lambda\neq0$$ $$y_i^\lambda=\log_e y_i, \lambda=0$$

Discovery of the $\lambda$, or the Box-Cox transformation coefficient can be estimated through a variety of means. Specific lambda coefficients are the same as other transformations: $\lambda=0.5$ is a square root transformation, $\lambda=0$ is the log transformation.

Osborne, J. W. (2013). Best practices in data cleaning: a complete guide to everything you need to do before and after collecting your data. Los Angeles: Sage.

• The sting is in the first sentence. As marginal normality is not an assumption here, how to test for it or bring it about is itself a secondary issue. – Nick Cox Mar 8 '17 at 17:23
• What do you mean by sting? – Jay Schyler Raadt Mar 8 '17 at 17:42
• "If normality is an assumption of your analysis ..." But it isn't an assumption. For example, binary predictors are fine in this kind of model, even they fail absolutely at being normally distributed. – Nick Cox Mar 8 '17 at 17:52
• Proper notation is not $log_e(y_i)$ but $\log_e(y_i)$, coded as \log_e(y_i). This gets you proper spacing in things like $a\log b$ (coded as a\log b) and $a\log(b)$ (coded as a\log b). I included both examples to show the context-dependent nature of the spacing: there is less space to the right of $\log$ in the second example. $\qquad$ – Michael Hardy Mar 8 '17 at 20:01
• This is a nice example for using a Box-Cox transformation. – Michael R. Chernick Mar 8 '17 at 22:23

Having normally distributed predictor variables is not an assumption of logistic regression. Use the predictors as they are, without stratifying them (turning them into categories).