Multivariate analysis of variance (James test) {mvhtests} | R Documentation |
Multivariate analysis of variance (James test)
Description
Multivariate analysis of variance without assuming equality of the covariance matrices.
Usage
maovjames(x, ina, a = 0.05)
Arguments
x |
A matrix containing Euclidean data. |
ina |
A numerical or factor variable indicating the groups of the data. |
a |
The significance level, set to 0.005 by default. |
Details
James (1954) also proposed an alternative to MANOVA when the covariance matrices are not assumed equal. The test statistic for samples is
where and
are the sample mean vector and sample size of the
-th sample respectively and
, where
is the covariance matrix of the
-sample mean vector and
is the estimate of the common mean
.
Normally one would compare the test statistic with a , where
are the degrees of freedom with
denoting the number of groups and
the dimensionality of the data. There are
constraints (how many univariate means must be equal, so that the null hypothesis, that all the mean vectors are equal, holds true), that is where these degrees of freedom come from. James (1954) compared the test statistic with a corrected
distribution instead. Let
and
be
and
.
The corrected quantile of the distribution is given as before by
.
Value
A vector with the next 4 elements:
test |
The test statistic. |
correction |
The value of the correction factor. |
corr.critical |
The corrected critical value of the chi-square distribution. |
p-value |
The p-value of the corrected test statistic. |
Author(s)
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
References
James G.S. (1954). Tests of Linear Hypotheses in Univariate and Multivariate Analysis when the Ratios of the Population Variances are Unknown. Biometrika, 41(1/2): 19–43.
See Also
Examples
maov( as.matrix(iris[,1:4]), iris[,5] )
maovjames( as.matrix(iris[,1:4]), iris[,5] )