Multivariate tests
Hotelling's $T^2$ test
HypothesisTests.OneSampleHotellingT2Test
— TypeOneSampleHotellingT2Test(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 μ₀
.
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 μ₀
.
HypothesisTests.EqualCovHotellingT2Test
— TypeEqualCovHotellingT2Test(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.
HypothesisTests.UnequalCovHotellingT2Test
— TypeUnequalCovHotellingT2Test(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.
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.BartlettTest
— TypeBartlettTest(X::AbstractMatrix, Y::AbstractMatrix)
Perform Bartlett's test of the hypothesis that the covariance matrices of X
and Y
are equal.
Bartlett's test is sensitive to departures from multivariate normality.
Correlation and partial correlation test
HypothesisTests.CorrelationTest
— TypeCorrelationTest(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
- Partial correlation on Wikipedia (for the construction of the confidence interval)
- Section testing using Student's t-distribution from Pearson correlation coefficient on Wikipedia
- K.J. Levy and S.C. Narula (1978): Testing Hypotheses concerning Partial Correlations: Some Methods and Discussion. International Statistical Review 46(2).