Wishart | R Documentation |
Density function and random generation from the Wishart distribution.
rwish(v, S)
dwish(W, v, S)
v |
Degrees of freedom (scalar). |
S |
Inverse scale matrix |
W |
Positive definite matrix W |
The mean of a Wishart random variable with v
degrees of freedom and
inverse scale matrix S
is vS
.
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.