mAdd1: Add or drop all possible terms

Description Usage Arguments Value See Also Examples

View source: R/mstep.R

Description

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

Usage

1
2
3
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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)

## End(Not run)

qtlmt documentation built on May 2, 2019, 2:23 p.m.

Related to mAdd1 in qtlmt...