rwish.RdSame code as rWishart function in package stats.
rwish(v, S, is_chol = FALSE, return_chol = FALSE)
| v | dof |
|---|---|
| S | the scale matrix (pxp) |
| is_chol | if TRUE, S is the upper Cholesky factor of S |
| return_chol | if TRUE, the upper Cholesky factor is returned |
a single random variate from W(v, S)
Uses (Press 2012; Anderson 2003) parametrization.
$$X \sim W(\nu, S)$$ with \(S\) is a \(p \times p\) matrix, \(\nu >= p\) (the degrees of freedom).
Then: $$E[X] = \nu S$$
Anderson TW (2003).
An Introduction to Multivariate Statistical Analysis, Wiley Series in Probability and Statistics, 3rd ed edition.
Wiley-Interscience, Hoboken, N.J.
ISBN 978-0-471-36091-9.
Press SJ (2012).
Applied Multivariate Analysis: Using Bayesian and Frequentist Methods of Inference.
Courier Corporation.
Other C++ functions:
chol2inv(),
diwishart_inverse(),
dmvnorm(),
inv_Cholesky_from_Cholesky(),
inv_sympd_tol(),
inv_triangular(),
isCholeskyOn(),
ldet_from_Cholesky(),
logCummeanExp(),
logCumsumExp(),
logSumExpMean(),
logSumExp(),
marginalLikelihood_internal(),
rmvnorm()
Other statistical functions:
diwishart_inverse_R(),
diwishart_inverse(),
diwishart(),
dmvnorm(),
dwishart(),
riwish_Press(),
rmvnorm()
Other Wishart functions:
diwishart_inverse_R(),
diwishart_inverse(),
diwishart(),
dwishart(),
get_minimum_nw_IW(),
riwish_Press()