Generates a random vector from a chi-square sampling model.
rvchisq(n = 1, df, ncp = 0)
number of variables to generate
integer, degrees of freedom, may be random
non-centrality parameter, may be random
A random vector (rv object) of length n
.
If any of the arguments are random, the resulting simulations may have non-Poisson marginal distributions.
Kerman, J. and Gelman, A. (2007). Manipulating and Summarizing Posterior Simulations Using Random Variable Objects. Statistics and Computing 17:3, 235-244.
See also vignette("rv")
.
rvchisq(1, df = 3)
#> mean sd 1% 2.5% 25% 50% 75% 97.5% 99% sims
#> [1] 2.9 2.2 0.2 0.22 1.2 2.4 4 8.8 9.6 200