[R] Forward Selection with regsubsets

From: <wkoh_at_bigred.unl.edu>
Date: Fri, 14 Mar 2008 10:52:37 -0500


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?



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 Fri 14 Mar 2008 - 15:55:19 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 Sun 16 Mar 2008 - 11:30:22 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