sureStep {qtlmt}R Documentation

SURE model selection

Description

Select a SURE model via model selection.

Usage

sureAdd1(object, y, x, range=NULL, iter=10000, tol=1e-12, ext=FALSE)

sureDrop1(object, y, x, range=NULL, iter=10000, tol=1e-12, ext=FALSE)

sureStep(object, y, x, cv, direction=c("both","backward","forward"),
   range=NULL, iter=10000, steps=1000, tol=1e-12, ext=FALSE)

surStep(y, x, v, lower, upper, k, direction=c("both","backward",
   "forward"), iter=10000, max.terms=200, steps=1000, tol=1e-12)

Arguments

object

initial model in model search; can be an object of sureEst.

y

a n by p matrix, whose columns are dependent variables.

x

a n by m matrix, whose columns are predictor variables to select from.

range

a list; range[[j]] indicates which x's (all if NULL) correspond to which y[,j].

cv

critical value used in the likelihood ratio test to determine adding/dropping a term.

v

a list; v[[j]] indicates which x's to start with for y[,j].

lower

a list in the format of v; lower scope of the model.

upper

a list in the format of v; upper scope of the model.

k

penalty, 0 if missing or <0.

direction

forward selection, backward elimination or stepwise.

iter

maximum number of iterations in a numerical process to estimate model parameters.

max.terms

maximum number of terms in the final model.

steps

maximum number of search steps.

tol

convergence tolerance.

ext

whether to perform an extensive search for an "optimal" model with the same number of QTL per phenotype.

Value

a list with the following components:

loglik

log-likelihood of the model

b

estimates of model coefficients

sigma

estimates of residual variance-covariance

v

variables selected in the model

Examples

data(etrait)
x<- as.matrix(mdat-1/2)
y<- as.matrix(traits)[,1:3]
v<- list()
upper<- list()
for(k in 1:ncol(y)){
   v[[k]]<- numeric(0)
   upper[[k]]<- 1:ncol(x)
}
## Not run: 
o1<- surStep(y, x, v=v, upper=upper, k=19)
o2<- sureStep(o1, y, x, cv=50, ext=FALSE)

# search for optimal model of o1
o3<- sureStep(o1, y, x, cv=Inf, direction="forward", ext=TRUE)

## End(Not run)

[Package qtlmt version 0.1-6 Index]