Re: [R] Forward Selection with regsubsets

From: Michael Dewey <>
Date: Sun, 16 Mar 2008 10:09:16 +0000

At 15:52 14/03/2008, wrote:
>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?

 > library(fortunes)
 > fortune("Yoda")

Evelyn Hall: I would like to know how (if) I can extract some of the information from the summary of my nlme. Simon Blomberg: This is R. There is no if. Only how.

You have a number of options.
1 - Doing a site search for relaimpo would be a good start. Read the author's related articles first before trying to implement the procedures. 2 - Understanding your data better would help. Are you not curious as to what these dependencies are which R tells you about? 3 - Choosing predictors at random would be fast and in the absence of any clue about why you are doing this could be a good solution.


Michael Dewey mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Sun 16 Mar 2008 - 10:13:34 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 - 12:30:21 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive