View source: R/LRT01_Independence.R
LRT01_Independence | R Documentation |
LRT01_Independence(W, n, p, options)
computes p
-value of the log-transformed LRT statistic,
W = -log(\Lambda)
, for testing the null hypothesis of independence (under
normality assumptions) of m
groups of variables (m > 1
), and/or its null
distribution CF/PDF/CDF.
LRT01_Independence(W, n, p, options)
W |
observed value of the minus log-transformed LRT statistic,
|
n |
sample size ( |
p |
vector |
options |
option structure, for more details see |
In particular, let X_k ~ N_{p_k}(\mu_k,\Sigma_k)
are p_k
dimensional random vectors, for k = 1,...,m
. Let us denote
X = (X_1,...,X_m)
and assume X ~ N_p(mu,\Sigma)
. Then, the null hypothesis is
given as H0: \Sigma = diag(\Sigma_1,...,\Sigma_m)
,
i.e. the off-diagonal blocks of Sigma are blocks of zeros. Here, the LRT
test statistic is given by
\Lambda = det(S) / prod(det(S_k))
,
where S
is MLE of Sigma, and S_k
are MLEs of \Sigma_k
, for k = 1,...,m
,
based on n samples from the compound vector X = (X_1,...,X_m)
.
Under null hypothesis, distribution of the test statistic \Lambda
is
\Lambda ~ prod_{k=1}^{m-1} prod_{j=1}^{p_k} (B_{jk})^{n/2}
,
with B_{jk} ~ Beta((n-q_k-j)/2,q_k/2)
, where q_k = p_{k+1} + ... + p_m
.
Here we assume that n > q_k
, for all k = 1,...,m-1
.
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-q-j)/2, q/2)}
,
where q = (q_1,...,q_m)
with q_k = p_{k+1} + ... + p_m
,
and j = (j_1,...,j_m)
with j_k = 1:p_k
.
p
-value of the log-transformed LRT statistic, W = -log(\Lambda)
and/or its null distribution CF/PDF/CDF.
Ver.: 16-Sep-2018 21:08:45 (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:
LRT02_EqualityMeans()
,
LRT03_EqualityCovariances()
,
LRT04_EqualityPopulations()
,
LRT05_Sphericity()
## EXAMPLE
# LRT for testing hypothesis about independence
# Null distribution of the minus log-transformed LRT statistic
n <- 30 # sample size
p <- c(3,4,5,6,7) # dimensions of X_k,k = 1,...,m where m = 5
# W <- vector() # observed value of W = -log(Lambda)
options <- list()
# options$coef <- -1
options$prob <- c(0.9,0.95,0.99)
output <- LRT01_Independence(n = n, p = p, options = options)
str(output)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.