On Wed, 11 May 2005, Smit, R. (Robin) (IenT) wrote:
Dear List members
I am using the regsubsets function to select a few predictor variables using Mallow's Cp:
sel.proc.regsub.full <- regsubsets(CO2 ~ v + log(v) + v.max + sd.v +tad + no.stops.km + av.stop.T + a + sd.a + a.max + d + sd.d + d.max + RPA + P + perc.stop.T + perc.a.T + perc.d.T + RPS + RPSS + sd.P.acc + P.dec + da.acc.1 + RMSACC + RDI + RPSI + P.acc + cov.v + cov.a + cov.d + sd.P + sd.v.run + RCS + T + mass.fin, data = DATASET, weights = count, nbest = 10, nvmax = 35, method = "exhaustive")
I do however encounter the following warning message which I do not understand:
Reordering variables and trying again:Warning messages: 1: 14 linear dependencies found in: leaps.setup(x, y, wt = wt, nbest = nbest, nvmax = nvmax, force.in = force.in, 2: XHAUST returned error code -999 in: leaps.exhaustive(a, really.big
The first message means that your variables are linearly redundant (very much so, with 14 linear dependencies in 35 variables). This probably explains the second warning.
You need to reduce nvmax: you can't fit any model with more than 35-14=21 variables. The code will work with linear dependencies as long as you set nvmax low enough -- according to Alan Miller's book it was written for situtations with more variables than observations. Try something like nvmax=10, and you will be able to see if there really is a use for models with even as many as 10 variables.
-thomas
______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html