Last chance! 50% off unlimited learning
Sale ends in
Select a SURE model via model selection.
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)
initial model in model search; can be an object of sureEst
.
a n by p matrix, whose columns are dependent variables.
a n by m matrix, whose columns are predictor variables to select from.
a list; range[[j]] indicates which x's (all if NULL
) correspond to which y[,j].
critical value used in the likelihood ratio test to determine adding/dropping a term.
a list; v[[j]] indicates which x's to start with for y[,j].
a list in the format of v
; lower scope of the model.
a list in the format of v
; upper scope of the model.
penalty, 0 if missing or <0.
forward selection, backward elimination or stepwise.
maximum number of iterations in a numerical process to estimate model parameters.
maximum number of terms in the final model.
maximum number of search steps.
convergence tolerance.
whether to perform an extensive search for an "optimal" model with the same number of QTL per phenotype.
a list with the following components:
log-likelihood of the model
estimates of model coefficients
estimates of residual variance-covariance
variables selected in the model
# NOT RUN {
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)
# }
Run the code above in your browser using DataLab