View source: R/LRT03_EqualityCovariances.R
LRT03_EqualityCovariances | R Documentation |
LRT03_EqualityCovariances(W, n, p, q, options)
computes p
-value of the log-transformed LRT statistic,
W = -log(\Lambda)
, for testing the null hypothesis of equality
of covariance matrices (under normality assumptions) of q
(q > 1
)
p
-dimensional populations, and/or its null distribution CF/PDF/CDF.
This is based on BALANCED samples of size n for each population!
LRT03_EqualityCovariances(W, n, p, q, options)
W |
observed value of the minus log-transformed LRT statistic
|
n |
sample size, |
p |
common dimension of the vectors |
q |
number of normal populations, |
options |
option structure, for more details see |
In particular, let X_k ~ N_p(mu_k,\Sigma_k
) are p
-dimensional random
vectors, for k = 1,...,q
. We want to test the hypothesis that the
covariance matrix \Sigma
is common for all X_k, k = 1,...,q
. Then, the
null hypothesis is given as H0: \Sigma_1 = ... = \Sigma_q
,
i.e. the covariance matrices are equal in all q
populations. Here, the
LRT test statistic is given by
\Lambda = ( q^{p*q} * prod(det(S_k)) / (det(S))^q )^{n/2}
,
where S_k
are MLEs of \Sigma_k
, for k = 1,...,q
, and S = S_1 + ... + S_q
,
based on n
samples from each of the the q
p
-dimensional populations.
Under null hypothesis, distribution of the test statistic \Lambda
is
\Lambda ~ prod_{k=1}^q prod_{j=1}^{p} (B_{jk})^{n/2}
,
with B_{jk} ~ Beta((n-j)/2,(j*(q-1)+2*k-1-q)/2)
, and we set B_{11} = 1
for j=k=1
. Here we assume that n > p
.
Hence, the exact characteristic function of the null distribution of
minus log-transformed LRT statistic \Lambda
, say W = -log(\Lambda)
is given by
cf = function(t) {cf_LogRV_Beta(-(n/2)*t, (n-j)/2, (j*(q-1)+2*k-1-q)/(2*q))}
,
where k = (1*o,...,q*o)
with p
-dimensional vector of ones o = (1,...,1)
and j = (j_1,...,j_q)
with j_k = 1:p
.
p
-value of the log-transformed LRT statistic, W = -log(\Lambda)
and/or its null distribution CF/PDF/CDF.
Ver.: 16-Sep-2018 21:10:08 (consistent with Matlab CharFunTool v1.3.0, 20-Jan-2018 12:43:15).
[1] ANDERSON, Theodore Wilbur. An Introduction to Multivariate Statistical Analysis. New York: Wiley, 3rd Ed., 2003.
[2] MARQUES, Filipe J.; COELHO, Carlos A.; ARNOLD, Barry C. A general near-exact distribution theory for the most common likelihood ratio test statistics used in Multivariate Analysis. Test, 2011, 20.1:180-203.
[3] WITKOVSKY, Viktor. Exact distribution of selected multivariate test
criteria by numerical inversion of their characteristic functions.
arXiv preprint arXiv:1801.02248, 2018.
Other Likelihood Ratio Test:
LRT01_Independence()
,
LRT02_EqualityMeans()
,
LRT04_EqualityPopulations()
,
LRT05_Sphericity()
## EXAMPLE
# LRT for testing hypothesis on equality of covariances
# Null distribution of the minus log-transformed LRT statistic
n <- 30 # total sample size
p <- 8 # dimension of X_k, k = 1,...,q where q = 5
q <- 5 # number of populations
# W <- vector() # observed value of W = -log(Lambda)
options <- list()
# options$coef <- -1
options$prob <- c(0.9, 0.95, 0.99)
output <- LRT03_EqualityCovariances(n = n, p = p, q = q, options = options)
str(output)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.