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

Share:

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

1
2
3
4
5
6
7
## 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(d.fossiles)
r.lm <-
  lm(cbind(sAngle,lLength,rWidth) ~ SST.Mean+Salinity+lChlorophyll+region+N,
     data=d.fossiles)
drop1(r.lm)  ##  should be the same as summary(manova(...)) for its last row.
r.mregr <-
  regr(cbind(sAngle,lLength,rWidth) ~ SST.Mean+Salinity+lChlorophyll+region+N,
       data=d.fossiles)
r.mregr$drop1
drop1(r.mregr, test="Pillai")

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.