rwish | R Documentation |
Simulates a random Wishart-distributed matrix
rwish(S0, nu = dim(S0)[1] + 2)
S0 |
a positive definite matrix |
nu |
a positive integer |
a positive definite matrix
Peter Hoff
## The expectation is S0*nu
S0<-rwish(diag(3))
SS<-matrix(0,3,3)
for(s in 1:1000) { SS<-SS+rwish(S0,5) }
SS/s
S0*5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.