Usage
varAdd1(x, group, vin=NULL, scope=1:ncol(x), k=0)
varDrop1(x, group, vin=1:ncol(x), k=0)
varStep(x, group, scope, k, kf=k/2, direction=c("both",
"forward","backward"))Arguments
x
a data matrix/frame. Columns are variables to select from.
group
a grouping indicator of observations.
vin
which variables (i.e., columns of x) already in model. It defines the initial model.
scope
which variables (i.e., columns of x) to select from.
k
entry/stay value in backward stepwise.
kf
entry/stay value in forward stepwise.
direction
forward selection, backward elimination or both stepwise.