View source: R/distributions.R
rScaledInvChi2 | R Documentation |
Simulates from the Scaled Inv-Chi2 distribution.
rScaledInvChi2(n, v, tau2)
n |
the number of draws |
v |
degrees of freedom parameter in the Scaled Inv-Chi2 distribution |
tau2 |
scale parameter in the Scaled Inv-Chi2 distribution |
vector with n draws
library(bayeslearn) draws = rScaledInvChi2(n = 10000, v = 5, tau2 = 10) mean(draws) # Should be close to the theoretical (v/(v-2))*\tau2 = 16.667
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.