drop1.mlm {regr}R Documentation

Drop All Possible Single Terms from or Add Terms to a Multivariate Model

Description

drop1.mlm / add1.mlm performs a test for the suitability of dropping / adding each term in scope from / to a multivariate regression or manova model.

Usage

## S3 method for class 'mlm'
drop1(object, scope = NULL,
      test = c("Wilks", "Pillai", "Hotelling-Lawley", "Roy"),
      total = TRUE, add = FALSE, ...)
## S3 method for class 'mlm'
add1(object, scope = NULL,
     test = c("Wilks", "Pillai", "Hotelling-Lawley", "Roy"), ...)

Arguments

object

a multivariate regression or manova object, possibly with class "regr", typically resulting from regr().

scope

see drop1 (in R's package stats).

test

a character string specifying the multivariate test to be used.

total

logical specifying if the test for null model should also be performed (and a "<total>" row be added to the resulting table).

add

logical, not to be set typically; add=TRUE is basically equivalent to add1.mlm().

...

potentially further arguments passed from or to methods; for unused for drop1(). For add1(): Arguments passed to drop1(..).

Value

a data.frame matrix containing statistics for each term.

Note

Note that regr performs such a (Wilks) test automatically. Bug: extract.AIC is not yet available

Author(s)

modification of R's summary.manova by Werner Stahel

See Also

drop1.regr, drop1.lm

Examples

data(d.fossileSamples, package="plgraphics")
r.lm <-
  lm(cbind(sAngle,lLength,rWidth) ~ SST+Salinity+lChlorophyll+Region+N,
     data=d.fossileSamples)
drop1(r.lm)  ##  should be the same as summary(manova(...)) for its last row.
r.mregr <-
  regr(cbind(sAngle,lLength,rWidth) ~ SST+Salinity+lChlorophyll+Region+N,
       data=d.fossileSamples)
r.mregr$drop1
drop1(r.mregr, test="Pillai")

[Package regr version 1.0 Index]