[R] Stepwise Logistic Regression
    Frank E Harrell Jr 
    f.harrell at vanderbilt.edu
       
    Wed Mar 21 19:51:31 CET 2007
    
    
  
Sergio Della Franca wrote:
> Dear R-Helpers,
> 
> I'd like to perform a Logistic Regression whit a Stepwise method.
> 
> 
> Can you tell me how can i proceed to develop this procedure?
> 
> 
> Thank you in advance.
> 
> 
> Sergio Della Franca.
If the number of events is not incredibly large, you can get almost the 
same result with the following code :-)
candidates <- setdiff(names(mydataframe), 'y')
p <- length(candidates)
sample(candidates, sample(round(p/4):round(p/2), 1))
-- 
Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University
    
    
More information about the R-help
mailing list