[R] Best Subsets regression

Thomas Lumley tlumley at u.washington.edu
Wed Feb 13 18:03:58 CET 2002


On Wed, 13 Feb 2002, Murray Jorgensen wrote:

> Hi,
>
> I have found a minor problem with leaps(). In 1.3.1 under Windows 2000 I
> seem to only be able to obtain values for one statistic at a time. That is
> choosing
>
> method=c("Cp","adjr2","r2")
>
> just gives Cp values.
>

<snip>
>
> Actually I have the same grip with SPLUS, so I suppose this feature is
> retained for compatibility?
>

Yes.  It would be fairly easy to fix as all three statistics are computed.
The second through fourth lines from the end of leaps() select which
statistic to return.

However, leaps() is just there for backwards compatibility. The preferred
function is regsubsets(), and summary.regsubsets() does return all these
statistics (plus BIC). It also knows about model formulas and has a quite
nice plot() method.

	-thomas

Thomas Lumley			Asst. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list