Aitchison's test for two mean vectors and/or covariance matrices | R Documentation |
Aitchison's test for two mean vectors and/or covariance matrices.
ait.test(x1, x2, type = 1, alpha = 0.05)
x1 |
A matrix containing the compositional data of the first sample. Zeros are not allowed. |
x2 |
A matrix containing the compositional data of the second sample. Zeros are not allowed. |
type |
The type of hypothesis test to perform. Type=1 refers to testing the equality of the mean vectors and the covariance matrices. Type=2 refers to testing the equality of the covariance matrices. Type=2 refers to testing the equality of the mean vectors. |
alpha |
The significance level, set to 0.05 by default. |
The test is described in Aitchison (2003). See the references for more information.
A vector with the test statistic, the p-value, the critical value and the degrees of freedom of the chi-square distribution.
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
John Aitchison (2003). The Statistical Analysis of Compositional Data, p. 153-157. Blackburn Press.
comp.test
x1 <- as.matrix(iris[1:50, 1:4])
x1 <- x1 / rowSums(x1)
x2 <- as.matrix(iris[51:100, 1:4])
x2 <- x2 / rowSums(x2)
ait.test(x1, x2, type = 1)
ait.test(x1, x2, type = 2)
ait.test(x1, x2, type = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.