2
$\begingroup$

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

$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – M P. Mar 8 '17 at 16:50
  • 1
    $\begingroup$ 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) $\endgroup$ – Jon Mar 8 '17 at 16:52
  • 5
    $\begingroup$ No linear or generalized linear model makes any assumptions about the distribution of the predictor variables. $\endgroup$ – Matthew Drury Mar 8 '17 at 16:53
  • $\begingroup$ @Jon, I do have some data points with wide variations, biomarkers, which I tend on normalizing first. $\endgroup$ – M P. Mar 8 '17 at 17:37
  • 2
    $\begingroup$ Do you mean that you will make blood pressure categorical rather than continuous? Isn't that just gratuitously discarding relevant information? $\endgroup$ – Michael Hardy Mar 8 '17 at 19:58
1
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – Nick Cox Mar 8 '17 at 17:23
  • $\begingroup$ What do you mean by sting? $\endgroup$ – Jay Schyler Raadt Mar 8 '17 at 17:42
  • $\begingroup$ "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. $\endgroup$ – Nick Cox Mar 8 '17 at 17:52
  • $\begingroup$ 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$ $\endgroup$ – Michael Hardy Mar 8 '17 at 20:01
  • $\begingroup$ This is a nice example for using a Box-Cox transformation. $\endgroup$ – Michael Chernick Mar 8 '17 at 22:23
1
$\begingroup$

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).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.