Aitchison's test for two mean vectors and/or covariance matrices {Compositional}R Documentation

Aitchison's test for two mean vectors and/or covariance matrices

Description

Aitchison's test for two mean vectors and/or covariance matrices.

Usage

ait.test(x1, x2, type = 1, alpha = 0.05)

Arguments

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.

Details

The test is described in Aitchison (2003). See the references for more information.

Value

A vector with the test statistic, the p-value, the critical value and the degrees of freedom of the chi-square distribution.

Author(s)

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

References

John Aitchison (2003). The Statistical Analysis of Compositional Data, p. 153-157. Blackburn Press.

See Also

comp.test

Examples

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)

[Package Compositional version 6.8 Index]