Wishart {MCMCpack} | R Documentation |
Density function and random generation from the Wishart distribution.
dwish(W, v, S) rwish(v, S)
W |
Positive definite matrix W (p x p). |
v |
Wishart degrees of freedom (scalar). |
S |
Wishart scale matrix (p x p). |
dwish
evaluates the density at positive definite matrix W.
rwish
generates one random draw from the distribution.
density <- dwish(matrix(c(2,-.3,-.3,4),2,2), 3, matrix(c(1,.3,.3,1),2,2)) draw <- rwish(3, matrix(c(1,.3,.3,1),2,2))