multilm {multilm}R Documentation

Mulivariate Linear Models

Description

multilm fits a multivariate linear model und performs the Hotelling T^2 - Test for a given linear test problem.

Usage

multilm(formula, K, Z, data=list())

Arguments

formula a symbolic description for the multivariate model to be tested
K a test matrix
Z a matrix for parameter restrictions
data an optional data frame containing the variables in the model. By default the variables are taken from the environment which 'multilm' is called from

Details

A multivariate linear model is a model of the form Y = X B + E, where Y is the matrix of responses, X is the design matrix, B is the matrix of coefficients and E a matrix of normally distributed errors. Parameter restrictions can be included by the Z matrix: Z B = 0 (which has applications in MANOVA). multilm additionally calculates the Hotelling T^2-Test for the given test problem: H0: K B = 0. An approximation by Laeuter is used for the distribution of the T^2-statistic (and therefore for the p-value). T^2 is not very useful when the number of observations is limited but many variables are included in the model. This problem is solved by the stabilized multivariate test procedures by Laeuter et. al. , which are available in summary.multilm

Value

A object of class multilm containing the following components:

hotelstat the T^2 test statistic
hotelp the pvalue of the T^2-test
coefficients the matrix of estimated coefficients
covar the estimation of the covariance matrix

Author(s)

Torsten Hothorn <hothorn@statistik.uni-dortmund.de>

References

Ahrens, H.; Laeuter, J. (1981): Mehrdimensionale Varianzanalyse, Berlin

See Also

summary.multilm

Examples

# Edgar Anderson's famous iris data
data(iris)
# one-classification MANOVA, Y response matrix, X design matrix
Y <- as.matrix(iris[,1:4]);
x <- c(rep(1,50), rep(0,150), rep(1, 50), rep(0, 150), rep(1,50))
X <- matrix(x, ncol=3)
# restrictions: sum of effects equal zero
Z <- c(0,1,1,1);
# test for equal effects
K <- cbind(0,diag(2),-1);
# model (this method returns a multilm object)
mod <- multilm(Y ~ X, K,Z);
# output and stable tests
summary(mod)            # Hotelling T^2: pvalue = 0