[R] Step wise regression

Paul DeBruicker pdebruic at gmail.com
Wed May 4 18:06:25 CEST 2005


Hi Walmir,

Here is the long version of Frank Harrell's answer.  

http://www.pitt.edu/~wpilib/statfaq/regrfaq.html


Paul


On Tue, 2005-05-03 at 08:21 -0500, Frank E Harrell Jr wrote:
> walmir-rodrigues wrote:
> > Dear Fellows,
> > 
> > How can I do to proced a step wise regression in R, if it´s possible ?
> > 
> > Thanks,
> > 
> > Walmir 
> 
> Here is an easy approach that will yield results only slightly less 
> valid than one actually using the response variable:
> 
> x <- data.frame(x1,x2,x3,x4,..., other potential predictors)
> x[,sample(ncol(x))]
> 
> :-)   -Frank
> 
>




More information about the R-help mailing list