hotelling.trace {agce}R Documentation

Compute the hotteling trace statistics.

Description

The trace statistic is computed by matrix multiplication. It depends on the contrast matrices, the design matrix and the observations.

Usage

hotelling.trace(X, Y, C, U)

Arguments

X The design matrix.
Y The matrix of observations.
C The left contrast matrix.
U The right contrast matrix.

Value

The hotelling trace statistic.

Author(s)

Raphael Gottardo

References

1
Steven F. Arnold.The Theory of Linear Models and Multivariate Analysis. John Wiley & Sons.New York, 1981.
2
Daniel F. Heitjan, Andrea Manni and Richard J. Santen.Statistical Analysis of in Vivo Tumor Growth Experiments.Cancer Research 1993.53:6042-6050.

Examples

data(Bt20)
### Remove the missing values (if any)
Bt20<-remove.NA(Bt20)
###Create the design matrix
X<-design.matrix(Bt20[,1])
###Convert as numeric the measurement
Y<-as.matrix(Bt20[,3:dim(Bt20)[2]])
### Number of groups
p<-dim(X)[2]
### Default contrast matrices
C<-cbind(rep(1,p-1),-diag(p-1))
U<-rbind(rep(1,p),-diag(p))
### Compute the Lawley Hotteling trace statistics
tr<-hotelling.trace(X,Y,C,U)
 

[Package agce version 1.2 Index]