Learn R Programming

leaps (version 3.2)

leaps.setup: Internal functions for leaps(), subsets()

Description

These functions are used internally by regsubsets and leaps. They are wrappers for Fortran routines that construct and manipulate a QR decomposition.

Usage

leaps.setup(x,y,wt=rep(1,length(y)),force.in=NULL,force.out=NULL,intercept=TRUE,nvmax=8,
  nbest=1,warn.dep=TRUE)
leaps.seqrep(leaps.obj)
leaps.exhaustive(leaps.obj,really.big=FALSE)
leaps.backward(leaps.obj,nested)
leaps.forward(leaps.obj,nested)

Arguments

x

A matrix of predictors

y

A response vector

wt

Optional weight vector

intercept

Add an intercept to the model

force.in

vector indicating variable that must be in the model

force.out

vector indicating variable that must not be in the model

nbest

Number of subsets of each size to report

nvmax

largest subset size to examine

warn.dep

warn if x is not of full rank

leaps.obj

An object of class leaps as produced by leaps.setup

really.big

required before R gets sent off on a long uninterruptible computation

nested

Use just the forward or backward selection models, not the models with variables 1:nvmax constructed for free in the setup

See Also

regsubsets, leaps