Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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


leaps

Regression Subset Selection

v3.1
GPL (>= 2)
Authors
Thomas Lumley based on Fortran code by Alan Miller
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.