On Wed, 7 Apr 2010, thedoctor81877 wrote:


Hullo,
I am trying to use the leaps package, & keep getting the following error:
Error in leaps.setup(x, y, wt = wt, nbest = nbest, nvmax = NCOL(x) + int,  :
 y and x different lengths

x might be a data frame rather than a matrix.

In any case, although you don't say, my psychic debugging powers tell me that 
you are using the leaps() function from the package.  Use regsubsets() instead. 
As the help page indicates, leaps() is just there for compatibility with S-PLUS.

My data set is attached below.

No, it isn't.  It may have been stripped off by the mailing list.

    -thomas

Thomas Lumley                   Assoc. Professor, Biostatistics
tlum...@u.washington.edu        University of Washington, Seattle

______________________________________________
R-help@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.

Reply via email to