Noncentral Distribution of Wilks’ \(\Lambda\): MANOVA#
- class ctx.dist_wilks_lambda_glm(p, m, n, omega)#
where
ctxisfpm,mpm,ipm,dec,gmporapm.The noncentral Wilks’ \(\Lambda\) distribution under the GLM alternative, with \(p \ge 1\) predictor variables, error degress of freedom \(m \ge 1\) and \(n \ge 1\), noncentrality parameter \(\Omega\) with diagonal entries \(\omega_{jj} \in (0,\infty)\) is a continuous probability distribution with the support interval \((0,1)\). See also Anderson [9], Muirhead [440], Butler [172], Butler and Wood [174], Butler and Wood [175], Fujikoshi [353], Fujikoshi [354], Fujikoshi [355], Lee [427], Lee [428], Walster and Tretter [864], Witkovský [1642].
- dist_wilks_lambda_glm.pdf(x)#
Returns \(\text{pdf}_X(x)\), the probability density function (pdf) of a random variable \(X\), following the noncentral distribution of Wilks’ Lambda (GLM): The pdf is computed by numerical inversion of the characteristic function or cumulant generating function.
>>> from mpfunlab import * >>> mp.dps = 30 >>> mu = 0; sigma = 1; x = 3; >>> print ("pdf: ", wilks_lambda_glm(mu, sigma).pdf(x)) 6.3563523462564525615615615614561356E-20
- dist_wilks_lambda_glm.cdf(x)#
Returns \(\text{cdf}_X(x)\), the cumulative distribution function (cdf) of a random variable \(X\), following the noncentral distribution of Wilks’ Lambda (GLM): The cdf is computed by numerical inversion of the characteristic function or cumulant generating function.
>>> from mpfunlab import * >>> mp.dps = 30 >>> mu = 0; sigma = 1; x = 3; >>> print ("cdf: ", wilks_lambda_glm(mu, sigma).pdf(x)) 6.3563523462564525615615615614561356E-20
- dist_wilks_lambda_glm.sf(x)#
Returns \(\text{sf}_X(x)\), the survival function (sf) of a random variable \(X\), following the noncentral distribution of Wilks’ Lambda (GLM):
\[\text{sf}_X(x) = 1 - \text{cdf}_X(x) = \int_{x}^{\infty} \text{pdf}_X(x) \mathrm{d} t.\]>>> from mpfunlab import * >>> mp.dps = 30 >>> mu = 0; sigma = 1; x = 3; >>> print (" sf: ", wilks_lambda_glm(mu, sigma).pdf(x)) sf: 6.3563523462564525615615615614561356E-20
- dist_wilks_lambda_glm.qtf(q)#
Returns \(\text{qtf}_X(x)\), the quantile function (qtf) of a random variable \(X\), following the noncentral distribution of Wilks’ Lambda (GLM):
There is no known closed form for the quantile function \(\text{cdf}^{-1}_X(q)\): It is computed with Newton iterations where the starting values are from a central chi-square approximation.
>>> from mpfunlab import * >>> mp.dps = 30 >>> mu = 0; sigma = 1; q = 0.3; >>> print ("qtf: ", wilks_lambda_glm(mu, sigma).qtf(q)) qtf: 6.3563523462564525615615615614561356E+00
- dist_wilks_lambda_glm.isf(q)#
Returns \(\text{isf}_X(q)\), the inverse survival function (isf) of a random variable \(X\), following the noncentral distribution of Wilks’ Lambda (GLM):
\[\text{isf}_X(q) = \text{qtf}_X(1-q) = \text{cdf}^{-1}_X(1-q).\]>>> from mpfunlab import * >>> mp.dps = 30 >>> mu = 0; sigma = 1; q = 0.3; >>> print ("isf: ", wilks_lambda_glm(mu, sigma).isf(q)) 6.3563523462564525615615615614561356E+00
- dist_wilks_lambda_glm.c_x(t)#
Returns \(C_X(t)\), the characteristic function of a random variable \(X\), following the noncentral distribution of Wilks’ Lambda (GLM):
\[C_X(t) = \frac{\Gamma_p(n/2 -it)\Gamma_p((n + m)/2)}{\Gamma_p(n/2)\Gamma_p((n + m)/2 -it)} {}_1F_1\left( -it ;\frac{n + m}{2}+ -it ; -\frac{1}{2}\Omega\right).\]>>> from mpfunlab import * >>> mp.dps = 30 >>> mu = 0; sigma = 1; t = 0.3; >>> print ("c_x: ", wilks_lambda_glm(mu, sigma).c_x(t)) 6.3563523462564525615615615614561356E+00
- dist_wilks_lambda_glm.m_x(t)#
Returns \(M_X(t)\), the moment generating function of a random variable \(X\), following the noncentral distribution of Wilks’ Lambda (GLM):
\[M_X(t) = \left[ \frac{\Gamma_p(n/2 + s)\Gamma_p((n + m)/2)}{\Gamma_p(n/2)\Gamma_p((n + m)/2 + s)} {}_1F_1 \left(s,\tfrac{1}{2}(n+m)+s,-\tfrac{1}{2}\Omega\right) \right].\]>>> from mpfunlab import * >>> mp.dps = 30 >>> mu = 0; sigma = 1; t = 0.3; >>> print ("c_x: ", wilks_lambda_glm(mu, sigma).c_x(t)) 6.3563523462564525615615615614561356E+00
- dist_wilks_lambda_glm.k_x(s, k=0)#
Returns \(K_X(s)\), the cumulant generating function, and its \(j^{\text{th}}\) derivatives, \(K_X^{(j)}(s), j = 1 \ldots k\), of a random variable \(X\), following the noncentral distribution of Wilks’ Lambda (GLM):
\[K_X(s) = \log \left[ \frac{\Gamma_p(n/2 + s)\Gamma_p((n + m)/2)}{\Gamma_p(n/2)\Gamma_p((n + m)/2 + s)} {}_1F_1 \left(s,\tfrac{1}{2}(n+m)+s,-\tfrac{1}{2}\Omega\right) \right].\]\begin{eqnarray} K'(s) & = & \sum_{i=1}^p \left[\psi \left( \tfrac{1}{2}n+s - \tfrac{1}{2}(i-1)\right) - \psi \left( \tfrac{1}{2}(n+m)+s - \tfrac{1}{2}(i-1)\right) \right] \nonumber \\ & + & \frac{\partial}{\partial s} \log \left[ {}_1F_1 \left(s,\tfrac{1}{2}(n+m)+s,-\tfrac{1}{2}\Omega\right) \right] \nonumber , \end{eqnarray}where \(\Gamma_p(\cdot)\) is the multivariate gamma function , \(\psi(\cdot)\) is the digamma function , and \({}_1F_1(\cdot,\cdot,X)\) is the confluent hypergeometric function of matrix argument .
>>> from mpfunlab import * >>> mp.dps = 30 >>> mu = 0; sigma = 1; t = 0.3; k = 6; >>> print ("c_x: ", wilks_lambda_glm(mu, sigma).k_x(t, k)) 6.3563523462564525615615615614561356E+00
- dist_wilks_lambda_glm.moments(k)#
Returns the first \(j\) raw moments, \(\mu_j, j = 1 \ldots k\), of a random variable \(X\), following the noncentral distribution of Wilks’ Lambda (GLM):
\[\mu'_X(r) = \frac{\Gamma_p(n/2 + s)\Gamma_p((n + m)/2)}{\Gamma_p(n/2)\Gamma_p((n + m)/2 + s)} {}_1F_1\left(s ;\frac{n + m}{2}+ s ; -\frac{1}{2}\Omega\right).\]>>> from mpfunlab import * >>> mp.dps = 30 >>> mu = 0; sigma = 1; k = 6; >>> print ("saddlepoint: ", wilks_lambda_glm(mu, sigma).moments(k)) 6.3563523462564525615615615614561356E+00
- dist_wilks_lambda_glm.cumulants(k)#
Returns the first \(j\) cumulants, \(\kappa_j, j = 1 \ldots k\), of a random variable \(X\), following the noncentral distribution of Wilks’ Lambda (GLM) The cumulants are calculated from the moments.
>>> from mpfunlab import * >>> mp.dps = 30 >>> mu = 0; sigma = 1; k = 6; >>> print ("saddlepoint: ", wilks_lambda_glm(mu, sigma).cumulants(k)) 6.3563523462564525615615615614561356E+00
Approximations
- ctx.wilks_lambda_glm_gp(x, p, m, n, Omega, cdf=True, method='default')#
where
ctxisdec,mpm,fpm,gmporapm.Calculates the pdf, cdf and sf from the characteristic function using the procedure of Gil-Pelaez (see gil_pelaez_pdf() and gil_pelaez_cdf()).
This uses \(U = \log 2 W\).
- ctx.wilks_lambda_glm_spa(x, n, results='c')#
where
ctxisfpm,mpm,ipm,dec,gmporapm.Calculates the Luggannini-Rice saddlepoint approximation of the pdf, cdf and sf.
This uses \(2\log W\) of non-central Wilks \(W\)
- ctx.wilks_lambda_glm_inv(x, n, results='qtf')#
where
ctxisfpm,mpm,ipm,dec,gmporapm.Calculates the inverse Jensen saddlepoint approximation of the qtf and isf.
This uses \(2\log W\) of non-central Wilks \(W\)