0
$\begingroup$

Having read Frank Harrel's list of problem caused by binning continuous variables (http://biostat.mc.vanderbilt.edu/wiki/Main/CatContinuous), I understand that binning should be avoided for model fitting.

I fit a logistic regression on multiple correlated variables, without binning them.

However, for practical use, I would be interested in binning my variables relatively to their impact, while keeping the impact of those bins comparable for some subgroup of my variables.

More formally, i have some strongly correlated variables $X_1$,$X_2$,$X_3$,$X_4$, a binary output $y$ and a fitted probability p. How could I bin $X_1$,$X_2$,$X_3$,$X_4$ in, say ten bins, such that each bin for the subgroup ($X_1$, $X_2$) have a similar impact on $p$ and that each bin for the subgroup ($X_3$,$X_4$) have a similar impact on $p$.

$\endgroup$
  • $\begingroup$ What do you hope to gain by doing this? Are you just trying to find a good way to display the data? And what do you mean by the 'impact' of a bin, when the variable is continuous, and it is therefore the width of the bin that would influence most definitions of 'impact'? $\endgroup$ – mkt - Reinstate Monica Sep 18 at 9:12
  • $\begingroup$ It is for practical use of the model. In case of missing value, or adjustement to the variable, the operator will be asked to specify a bin, not an exact value. By impact I mainly think about odds or log-odds, but other meaninfull impact metrics would be fine. $\endgroup$ – lcrmorin Sep 18 at 9:34
  • $\begingroup$ It sounds like this is for using the model to make predictions. If so, then I'm not sure it makes sense to fit the model to continuous data and then do some binning procedure. I just don't know how that would work. If you must used binned values for predictions (and I dislike binning for reasons you seem to be aware of), then I don't see how you get around fitting the model to binned data. $\endgroup$ – mkt - Reinstate Monica Sep 18 at 9:50
  • 1
    $\begingroup$ "A posteriori binning would help avoid the loss of information that happen when bining a priori." I don't think this is true. I think it may be worse, but I'm not sure. $\endgroup$ – mkt - Reinstate Monica Sep 18 at 9:59
  • 1
    $\begingroup$ Is there a reason the operator cannot specify a precise but approximate value? I can't see why that is harder than specifying a bin. The precise value could be the middle of a bin, for example. $\endgroup$ – mkt - Reinstate Monica Sep 18 at 15:19

Your Answer

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

Browse other questions tagged or ask your own question.