Re: [R] Discretize continous variables....

From: Frank E Harrell Jr <f.harrell_at_vanderbilt.edu>
Date: Sat, 19 Jul 2008 09:22:22 -0500

milicic.marko wrote:
> Hi R helpers,
>
>
> I'm preparing dataset to fir logistic regression model with lrm(). I
> have various cointinous and discrete variables and I would like to:
>
> 1. Optimaly discretize continous variables (Optimaly means, maximizing
> information value - IV for example)

This will result in effects in the model that cannot be interpreted and will ruin the statistical inference from the lrm. It will also hurt predictive discrimination. You seem to be allergic to continuous variables.

> 2. Regroup discrete variables to achieve perhaps smaller number of
> level and better information value...

If you use the Y variable to do this the same problems will result. Shrinkage is a better approach, or using marginal frequencies to combine levels. See the "pre-specification of complexity" strategy in my book Regression Modeling Strategies.

Frank

>
>
> Please suggest if there is some package providing this or same
> functionality for discretization...
>
>
> if there is no package plese suggest how to achieve this.
>
>
>
>
> Many thanks helpers.
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Sat 19 Jul 2008 - 14:26:40 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 19 Jul 2008 - 15:31:54 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive