# Chi-bar-square distribution with nonnegativity cone constraints

### Description

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

### Usage

1 2 3 |

### Arguments

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

### Value

`pchibarsq`

gives the distribution function, `wchibarsq`

gives the mixing proportion, and `mchibarsq`

gives the moments,

### Author(s)

Long Qu

### References

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.

### See Also

`stats::pchisq`

### Examples

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)
``` |

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.