I know this has been asked before, and I have read through the responses to the earlier queries related to binning continuous variables. I do understand that generally we should avoid binning, given that it potentially results in throwing away useful information (among other issues). However, I am trying to build a logistic regression model, and one of my significant predictors is a continuous variable. I have tried 2 different models. In the first, I input the variable as-is (continuous), whereas in the second, I fed it as a categorical variable (categorized as per quartiles).

The second model (with the binned variable) had lower AIC score and cross validated error. Could this be considered sufficient justification for binning in this particular case?

  • $\begingroup$ Is there outside justification for the quartile division? For example, in biostatistics, drawing a cutoff value at a clinically relevant value, say BMI<25 as normal weight and BMI>=25 as overweight/obese, can be very valuable. It adds a lot of clinical utility (eg. giving advice or assessing risk) to divide at that point. $\endgroup$
    – Ashe
    Commented May 21, 2015 at 15:31
  • 1
    $\begingroup$ Not really! Except that we summarize and report lot of our data as per quartiles. $\endgroup$
    – Dataminer
    Commented May 21, 2015 at 15:42
  • $\begingroup$ "I have read through the responses to the earlier queries related to binning continuous variables" -- could someone link to these questions / responses? $\endgroup$
    – zthomas.nc
    Commented Mar 7, 2021 at 20:38

1 Answer 1


This probably means that your predictor has a non-linear relationship with the response, and binning is allowing the model to capture some of this non-linear trend. Looking at a scatter plot of your data could help you determine what shape of fit is appropriate. You may want to attempt a non-linear continuous fitting strategy, say polynomial or spline basis transformations.

  • $\begingroup$ What leads you to suspect non-linearity? How could quartiles pick up on non-linearity? $\endgroup$
    – Joel W.
    Commented Dec 18, 2020 at 14:00
  • $\begingroup$ @JoelW the predicted values/effects of the quartiles could be similar to a quadratic function (or any other function) $$\begin{array}{}2019Q1 = 1\\ 2019Q2 = 4\\ 2019Q3 = 9 \\ 2019Q4 = 16 \\ 2020Q1 = 25 \\ 2021Q2 = 36 \\ 2019Q3 = 49 \\ ...\end{array}$$ The suspicion that this is the case stems from the idea that this is the way how the binned predictor (which relates to many more coefficients) is still outperforming the linear predictor. $\endgroup$ Commented Dec 18, 2020 at 17:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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