Multivariate tests
Hotelling’s test
#
HypothesisTests.OneSampleHotellingT2Test — Type
OneSampleHotellingT2Test(X::AbstractMatrix, μ₀=<zero vector>)
Perform a one sample Hotelling’s 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 test of the hypothesis that the vector of mean column differences between X and Y is equal to μ₀.
#
HypothesisTests.EqualCovHotellingT2Test — Type
EqualCovHotellingT2Test(X::AbstractMatrix, Y::AbstractMatrix)
Perform a two sample Hotelling’s 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 — Type
UnequalCovHotellingT2Test(X::AbstractMatrix, Y::AbstractMatrix)
Perform a two sample Hotelling’s 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 -test for two groups.
#
HypothesisTests.BartlettTest — Type
BartlettTest(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 — Type
CorrelationTest(x, y)
Perform a t-test for the hypothesis that , i.e. the correlation of vectors x and y is zero.
CorrelationTest(x, y, Z)
Perform a t-test for the hypothesis that , 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 -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