Description Usage Arguments Value Author(s) References See Also Examples
pchibarsq
is the distribution function of chi-bar-square distribution with nonnegativity cone constraint.
wchibarsq
computes the mixing proportions for the chi-bar-square distribution.
mchibarsq
computes the moments of the chi-bar-square distribution.
1 2 3 |
q |
A vector of quantiles, as in |
V |
A positive-definite matrix, defining the distance measure used when projecting onto the cone. |
lower.tail |
logical, the same as in |
log.p |
logical, the same as in |
order |
A positive integer vector of the order of moments to be computed. |
pchibarsq
gives the distribution function, wchibarsq
gives the mixing proportion, and mchibarsq
gives the moments,
Long Qu
A. Shapiro (1988) Towards a Unified Theory of Inequality Constrained Testing in Multivariate Analysis. Int. Stat. Rev. 56, 49–62.
Akio Kudo (1963) A multivariate analogue of the one-sided test. Biometrika 50, 403–418.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | set.seed(203490L)
V=crossprod(matrix(rnorm(25),5))
VI=solve(V)
L=t(chol(V))
chibarsq=replicate(1e3L, -2*quadprog::solve.QP(VI, VI%*%(L%*%rnorm(5)),
diag(1,5), rep(0,5))[['value']] )
chibarsq=sort(chibarsq)
p=pchibarsq(chibarsq, V)
## Not run:
plot(ecdf(chibarsq))
lines(chibarsq, p, col=4, lwd=3, lty=3)
## End(Not run)
mean(chibarsq); mean(chibarsq^2)
mchibarsq(V)
|
[1] 2.154623
[1] 9.768387
[1] 2.167540 9.840137
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.