LRT04_EqualityPopulations: p-value of the log-transformed LRT statistic and/or its null...

View source: R/LRT04_EqualityPopulations.R

LRT04_EqualityPopulationsR Documentation

p-value of the log-transformed LRT statistic and/or its null distribution CF/PDF/CDF

Description

LRT04_EqualityPopulations(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 q (q > 1) p-dimensional normal populations, and/or its null distribution CF/PDF/CDF. This is based on BALANCED samples of size n for each population!

This is an EXPERIMENTAL version. Correctness should be checked again!

Usage

LRT04_EqualityPopulations(W, n, p, q, options)

Arguments

W

observed value of the minus log-transformed LRT statistic W = -log(\Lambda). If empty, the algorithm evaluates the CF/PDF/CDF and the quantiles of the null distribution of W.

n

sample size, n > min(p+q-1).

p

common dimension of the vectors X_k, k = 1,...q.

q

number of normal populations, q > 1.

options

option structure, for more details see cf2DistGP. Moreover,
x set vector of values where PDF/CDF is evaluated,
prob set vector of probabilities for the quantiles,
coef set arbitrary multiplicator of the argument t of the characteristic function. If empty, default value is -n/2 (standard value for minus log-transform of LRT). Possible alternative is e.g. coef = -1, leading to W = -(2/n)*log(LRT).

Details

In particular, let X_k ~ N_p(\mu_k,\Sigma_k), for k = 1,...,q. We want to test the hypothesis that the q normal populations are equally distributed. That is, we want to test that the mean vectors \mu_k are equal for all k = 1,...,q, as well as the covariance matrices \Sigma_k are equal for all k = 1,...,q. Then, the null hypothesis is given as H0: \mu_1 = ... = \mu_q & \Sigma_1 = ... = \Sigma_k. Here, the null hypothesis H0 and the LRT statistic can be decomposed: \Lambda = \Lambda_Means * \Lambda_Covariances where (first) \Lambda_Covariances represents the LRT for testing equality of covariance matrices of given q normal populations, and (second) \Lambda_Means represents (conditionally) the LRT for testing equality of means of given q normal populations.

Under null hypothesis, distributions of \Lambda_Covariances and \Lambda_Means are independent, and the distribution of the test statistic \Lambda is Lambda ~ \Lambda_Means * \Lambda_Covariances, ~ (prod_{k=1}^q prod_{j=1}^{p} (B_{jk})^{n/2})* (prod_{j=1}^{p} (B_j)^{n*q/2}) where the B_{jk} and B_j are mutually independent beta distributed random variables. Here we assume that n is equal sample size for each sample, k = 1,...,q, 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))} . * cf_LogRV_Beta(-(n*q/2)*t, ((n-1)*q-i+1)/2, (q-1)/2), where i = (1, 2, ..., p), 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.

Value

p-value of the log-transformed LRT statistic, W = -log(\Lambda) and/or its null distribution CF/PDF/CDF.

Note

Ver.: 16-Sep-2018 21:10:45 (consistent with Matlab CharFunTool v1.3.0, 20-Jan-2018 12:43:15).

References

[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.

See Also

Other Likelihood Ratio Test: LRT01_Independence(), LRT02_EqualityMeans(), LRT03_EqualityCovariances(), LRT05_Sphericity()

Examples

## EXAMPLE
# LRT for testing hypothesis on equality of populations
# 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 <- LRT04_EqualityPopulations(n = n, p = p, q = q, options = options)
str(output)

gajdosandrej/CharFunToolR documentation built on June 3, 2024, 7:46 p.m.