View source: R/cf_LogRV_WilksLambda.R
cf_LogRV_WilksLambda | R Documentation |
cf_LogRV_WilksLambda(t, p, n, q, coef, niid)
evaluates characteristic function
of a linear combination (resp. convolution) of independent
LOG-TRANSFORMED WILK's LAMBDA distributed random variables.
cf_LogRV_WilksLambda(t, p, n, q, coef, niid)
t |
vector or array of real values, where the CF is evaluated. |
p |
vector of the dimension parameters |
n |
vector of degrees of freedom of the Wishart matrices |
q |
vector of degrees of freedom of the Wishart matrices |
coef |
vector of the coefficients of the linear combination of the log-transformed random variables.
If coef is scalar, it is assumed that all coefficients are equal.
If empty, default value is |
niid |
scalar convolution coeficient niid, such that |
cf_LogRV_WilksLambda
evaluates the characteristic function
of a random variable Y = coef_1*W_1 +...+ coef_N*W_N
, such that
cf_Y(t) = cf_W_1(coef_1*t) *...* cf_W_N(coef_N*t)
, where cf_W_i(t)
is CF of W_i = log(\Lambda_i)
,
and each \Lambda_i
has central WILK's LAMBDA distribution, \Lambda_i ~ Lambda(p_i,n_i,q_i)
,
for i = 1,...,N
.
In particular \Lambda_i = det(E_i)/det(E_i + H_i)
, with E_i
and H _i
being independent random matrices with central Wishart distributions,
E_i ~ Wp_i(n_i,\Sigma_i)
and H_i ~ Wp_i(q_i,\Sigma_i)
with n_i >= p_i
and \Sigma_i > 0
(an unknown positive definite symmetric covariance matrix), for all i = 1,...,N
.
Each particular Lambda_i statistic can be used to test specific null hypothesis
(by measuring its effect expressed by the matrix H_i
). In this case,
the null hypothesis is rejected for small values of the observed statistic \Lambda_i
,
or large value of -log(\Lambda_i)
.
The central Wilks' distribution of \Lambda_i ~ Lambda(p_i,n_i,q_i)
,
with Lambda_i
in (0,1)
, is defined by \Lambda_i ~ Prod_{j=1}^p_i B_{i,j}
,
where B_{i,j} ~ Beta{(n_i+1-j)/2, q_i/2)}
, i.e. B_{i,j}
follow independent Beta distributions
for all i = 1,...,N
and j = 1,...,p_i
.
Characteristic function cf(t)
of a linear combination of independent
LOG-TRANSFORMED WILK's LAMBDA distributed random variables.
Ver.: 04-Oct-2018 13:30:38 (consistent with Matlab CharFunTool v1.3.0, 19-Jul-2018 17:23:23).
[1] Witkovsky, V., 2018. Exact distribution of selected multivariate test criteria by numerical inversion of their characteristic functions. arXiv preprint arXiv:1801.02248.
For more details see WIKIPEDIA: https://en.wikipedia.org/wiki/Wilks
Other Continuous Probability Distribution:
cfS_Arcsine()
,
cfS_Beta()
,
cfS_Gaussian()
,
cfS_Laplace()
,
cfS_Rectangular()
,
cfS_Student()
,
cfS_TSP()
,
cfS_Trapezoidal()
,
cfS_Triangular()
,
cfS_Wigner()
,
cfX_ChiSquare()
,
cfX_Exponential()
,
cfX_FisherSnedecor()
,
cfX_Gamma()
,
cfX_InverseGamma()
,
cfX_LogNormal()
,
cf_ArcsineSymmetric()
,
cf_BetaNC()
,
cf_BetaSymmetric()
,
cf_Beta()
,
cf_ChiSquare()
,
cf_Exponential()
,
cf_FisherSnedecorNC()
,
cf_FisherSnedecor()
,
cf_Gamma()
,
cf_InverseGamma()
,
cf_Laplace()
,
cf_LogRV_BetaNC()
,
cf_LogRV_Beta()
,
cf_LogRV_ChiSquareNC()
,
cf_LogRV_ChiSquare()
,
cf_LogRV_FisherSnedecorNC()
,
cf_LogRV_FisherSnedecor()
,
cf_LogRV_MeansRatioW()
,
cf_LogRV_MeansRatio()
,
cf_LogRV_WilksLambdaNC()
,
cf_Normal()
,
cf_RectangularSymmetric()
,
cf_Student()
,
cf_TSPSymmetric()
,
cf_TrapezoidalSymmetric()
,
cf_TriangularSymmetric()
,
cf_vonMises()
## EXAMPLE 1
# CF of log Wilks Lambda RV distribution Lambda(p,n,q)
p <- 5
n <- 10 # d.f. of within SS&P
q <- 3 # d.f. of between SS&P
t <- seq(-10, 10, length.out = 201)
plotReIm(function(t)
cf_LogRV_WilksLambda(t, p, n, q),
t,
title = 'CF of log Wilks Lambda RV with Lambda(p,n,q), p=5, n=10, q=3')
## EXAMPLE 2
# CF of a weighted linear combination of minus log Wilks Lambda RVs
p <- c(5, 5, 5)
n <- c(10, 15, 20)
q <- c(3, 2, 1)
coef <- -c(10, 15, 20) / 45
t <- seq(-20, 20, length.out = 201)
plotReIm(function(t)
cf_LogRV_WilksLambda(t, p, n, q, coef),
t,
title = 'CF of a weighted linear combination of -log Wilks Lambda RVs')
## EXAMPLE 3
# PDF/CDF of minus log Wilks Lambda RV (p=5, n=10, q=3) from its CF
p <- 5
n <- 10
q <- 3
coef <- -1
cf <- function(t) {cf_LogRV_WilksLambda(t, p, n, q, coef)}
x <- seq(0, 5, length.out = 100)
prob <- c(0.9, 0.95, 0.99)
options <- list()
options$xMin <- 0
result <- cf2DistGP(cf, x, prob, options)
str(result)
## EXAMPLE 4
# Compare the exact distribution with the Bartlett's approximation
# The Bartlett's approximation (see e.g. Wikipedia) is given by:
# ((p-q+1)/2 - n)*log(Lambda(p,n,q)) ~ chi^2_{q*p}
p <- 15
n <- 30
q <- 3
coef <- (p - q + 1) / 2 - n
cf <- function(t) {cf_LogRV_WilksLambda(t, p, n, q, coef)}
prob <- c(0.9, 0.95, 0.99)
options <- list()
options$xMin <- 0
result <- cf2DistGP(cf, prob = prob, options = options)
str(result)
x <- result$x
matplot(cbind(x, x), cbind(result$cdf, pchisq(x, q * p)),
main = 'Exact CDF vs. the Bartlett approximation',
xlab = expression(paste("transformed ", Lambda, "(p,n,q)")),
ylab = 'CDF')
matplot(cbind(x, x), cbind(result$cdf, pchisq(x, q * p)),
main = 'Exact CDF vs. the Bartlett approximation',
xlab = expression(paste("transformed ", Lambda, "(p,n,q)")),
ylab = 'CDF', lwd = 2, type = "l")
prob
result$qf
qchisq(prob, q * p)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.