InvWishart | R Documentation |
Random generation for the inverse Wishart distribution. The parameterization is consistent with Gelman et al. (2013) (see References)
rinvwish(n, df, v)
n |
number of observations. If |
df |
degrees of freedom (non-negative, but can be non-integer). |
v |
An |
The dimensionality of the result is determined by n
for rinvwish
.
The result will be an array of size (nrow(v), nrow(v), n)
.
Gelman, A., Carlin, J. B., Stern, H. S., Dunson, D. B., Vehtari, A., & Rubin, D. B. (2013). Bayesian data analysis, 3rd edition. CRC press.
rWishart
Sigma = crossprod(matrix(rnorm(16), nrow = 4))
y = rinvwish(3, 4, Sigma)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.