Usage
sureAdd1(obj, y, x, range=NULL, iter=250, tol=1e-8, ext=FALSE)
sureDrop1(obj, y, x, range=NULL, iter=250, tol=1e-8, ext=FALSE)
sureStep(y, x, v, lower, upper, k, direction=c("both","backward",
"forward"), iter=250, max.terms=200, steps=1000, tol=1e-8)
sureStep2(obj, y, x, cv, direction=c("both","backward","forward"),
range=NULL, iter=250, steps=1000, tol=1e-8, ext=FALSE)Arguments
obj
initial model in model search; can be an object of sureEst. y
n by p matrix, whose columns are dependent variables.
x
n by m matrix, whose columns are predictor variables to select from.
cv
critical value used in the likelihood ratio test to determine adding/dropping a term.
v
list; v[[j]] indicates which x's to start with for y[,j].
range
list; range[[j]] indicates which x's (all if NULL) correspond to which y[,j].
lower
list in the format of v; lower scope of the model.
upper
list in the format of v; upper scope of the model.
k
penalty, 0 if missing or
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.