[R] how to categorize continuous variable when useing regression

Frank E Harrell Jr f.harrell at vanderbilt.edu
Thu Aug 20 14:50:05 CEST 2009

Manli Yan wrote:
>    assume dependent variable y( continuous),independent variable x (
> continuous),I try to  categorize x with some interval,such that,those
> intervals would has most significant different effect on y.
>    any one knows which method I should apply,I really need some hints,thanks
> so much~

This is a dangerous practice.  Unless you have mastered the bootstrap so 
that you can accurately estimate the damage to the statistical 
significance caused by such categorization, it is best to avoid this 


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

More information about the R-help mailing list