7
$\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$
  • $\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
  • $\begingroup$ Not really! Except that we summarize and report lot of our data as per quartiles. $\endgroup$ – Dataminer May 21 '15 at 15:42
13
$\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$
  • 1
    $\begingroup$ You're welcome. You should be able to see the shape of the relationship with a scatter-plot or related picture. Also, i'd much appreciate it if you accepted the answer : ) $\endgroup$ – Matthew Drury May 21 '15 at 15:47
  • $\begingroup$ Matthew - I think that comment you made would improve your answer. $\endgroup$ – Glen_b May 22 '15 at 1:18

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.