[R] all poss. regression

Thomas Lumley tlumley at u.washington.edu
Mon Apr 12 16:18:27 CEST 2004


On Sat, 10 Apr 2004, Prof Brian Ripley wrote:

> Look at package leaps.  Note that it applies to columns of the
> design matrix and not terms, so can be nonsensical with categorical
> predictors (let alone interactions of such).
>

A reasonable compromise is to run regsubsets() (in leaps) returning the
best hundred or so models of each size, and then refit each model ensuring
that the terms are treated sensibly.   I use this sometimes for variable
screening.

	-thomas




More information about the R-help mailing list