Learn R Programming

qtlmt (version 0.1-6)

mAdd1: Add or drop all possible terms

Description

Add or drop all possible terms to or from a multivariate multiple regression model.

Usage

mAdd1(object, scope, test = c("none","Chisq","F"), k = 0, ...)

mDrop1(object, scope, test = c("none","Chisq","F"), k = 0, ...)

Arguments

object

initial model.

scope

a formula or a vector of variable names, giving lower/upper bound of the model.

test

if not "none", the test statistic and p-value will be included in the output.

k

penalty on a parameter in AIC.

...

additional arguments to update.

Value

An object summarizing the differences in fit between the models.

See Also

add1 and mStep

Examples

Run this code
# NOT RUN {
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)

up<- formula(paste("~", paste("m",1:15,collapse=" + ",sep="")))
oa<- mAdd1(mlm, scope=up, test="F", k=5, data=mdf)

lw<- formula(paste("~ ", paste("m",1:3,collapse=" + ",sep="")))
od<- mDrop1(mlm, scope=lw, test="F", k=5, data=mdf)
# }

Run the code above in your browser using DataLab