11
$\begingroup$

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?

$\endgroup$
3
  • $\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
    May 21 '15 at 15:31
  • 1
    $\begingroup$ Not really! Except that we summarize and report lot of our data as per quartiles. $\endgroup$
    – Dataminer
    May 21 '15 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
    Mar 7 '21 at 20:38
19
$\begingroup$

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.

$\endgroup$
2
  • $\begingroup$ What leads you to suspect non-linearity? How could quartiles pick up on non-linearity? $\endgroup$
    – Joel W.
    Dec 18 '20 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$ Dec 18 '20 at 17:06

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.