[R] Forward Selection with regsubsets

wkoh at bigred.unl.edu wkoh at bigred.unl.edu
Fri Mar 14 16:52:37 CET 2008


Hi,

I would like to perform a forward selection procedure on a data set  
with 6 observations and 10 predictors. I tried to run it with  
regsubsets (I set nvmax=number of observations) but I keep getting  
these warning messages:

Warning messages:
1: 5  linear dependencies found in: leaps.setup(x, y, wt = weights,  
nbest = nbest, nvmax = nvmax,
2: nvmax reduced to  5 in: leaps.setup(x, y, wt = weights, nbest =  
nbest, nvmax = nvmax,

I think the problem was due to inadequate observations, is there any  
way to perform subset selection in R if the number of observations are  
less than the predictors?

Thanks!

Woonyuen



More information about the R-help mailing list