mStep {qtlmt} | R Documentation |
Model selection in multivariate multiple regression
Description
Select a multivariate multiple regression model via model selection.
Usage
mStep(object, scope, direction=c("both","backward","forward"),
trace=FALSE, keep=TRUE, steps=1000, k=2, ...)
Arguments
object |
initial model in model search. |
scope |
a single formula, which provides ‘upper’, or a list containing components ‘upper’ and ‘lower’, both formulae; defines the lower and upper bound. See |
direction |
forward selection, backward elimination or stepwise. |
trace |
whether to track the process for monitoring purpose. |
keep |
whether to return the change of terms and related statistics. |
steps |
maximum number of search steps. |
k |
penalty on a parameter. The selection criterion is the known "AIC" if |
... |
additional arguments to |
Value
a list with components of a lm
object plus ‘keep’ if required.
See Also
Examples
data(etrait)
mdf<- data.frame(traits,markers)
## Not run:
mlm<- lm(cbind(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16) ~
m1 + m2 + m3 + m4 + m5, data=mdf)
lw<- formula(paste("~ ", paste("m",1:3,collapse=" + ",sep="")))
up<- formula(paste("~", paste("m",1:15,collapse=" + ",sep="")))
ob<- mStep(mlm, scope=list(lower=lw), k=99, direction="backward", data=mdf)
of<- mStep(mlm, scope=list(upper=up), k=5, direction="forward", data=mdf)
o1<- mStep(mlm, scope=list(upper=up), k=5, direction="both", data=mdf)
o2<- mStep(o1, scope=list(upper=up), k=2, direction="forward", data=mdf)
## End(Not run)
[Package qtlmt version 0.1-6 Index]