Multivariate tests

Hotelling's $T^2$ test

HypothesisTests.OneSampleHotellingT2TestType
OneSampleHotellingT2Test(X::AbstractMatrix, μ₀=<zero vector>)

Perform a one sample Hotelling's $T^2$ test of the hypothesis that the vector of column means of X is equal to μ₀.

source
OneSampleHotellingT2Test(X::AbstractMatrix, Y::AbstractMatrix, μ₀=<zero vector>)

Perform a paired Hotelling's $T^2$ test of the hypothesis that the vector of mean column differences between X and Y is equal to μ₀.

source
HypothesisTests.EqualCovHotellingT2TestType
EqualCovHotellingT2Test(X::AbstractMatrix, Y::AbstractMatrix)

Perform a two sample Hotelling's $T^2$ test of the hypothesis that the difference in the mean vectors of X and Y is zero, assuming that X and Y have equal covariance matrices.

source
HypothesisTests.UnequalCovHotellingT2TestType
UnequalCovHotellingT2Test(X::AbstractMatrix, Y::AbstractMatrix)

Perform a two sample Hotelling's $T^2$ test of the hypothesis that the difference in the mean vectors of X and Y is zero, without assuming that X and Y have equal covariance matrices.

source

Equality of covariance matrices

Bartlett's test for equality of two covariance matrices is provided. This is equivalent to Box's $M$-test for two groups.

HypothesisTests.BartlettTestType
BartlettTest(X::AbstractMatrix, Y::AbstractMatrix)

Perform Bartlett's test of the hypothesis that the covariance matrices of X and Y are equal.

Note

Bartlett's test is sensitive to departures from multivariate normality.

source

Correlation and partial correlation test

HypothesisTests.CorrelationTestType
CorrelationTest(x, y)

Perform a t-test for the hypothesis that $\text{Cor}(x,y) = 0$, i.e. the correlation of vectors x and y is zero.

CorrelationTest(x, y, Z)

Perform a t-test for the hypothesis that $\text{Cor}(x,y|Z=z) = 0$, i.e. the partial correlation of vectors x and y given the matrix Z is zero.

Implements pvalue for the t-test. Implements confint using an approximate confidence interval based on Fisher's $z$-transform.

See also partialcor from StatsBase.

External resources

source