SBC_test | R Documentation |
Simulation based calibration
SBC_test(
...,
pars,
n.draws = 25L,
n.sim = 20L * n.draws,
burnin = 25L,
thin = 2L,
show.progress = TRUE
)
... |
passed to |
pars |
named list with univariate functions of the parameters to use in test. This list
is passed to argument |
n.draws |
number of posterior draws to retain in posterior simulations. |
n.sim |
number of simulation iterations. |
burnin |
burnin to use in posterior simulations, passed to |
thin |
thinning to use in posterior simulations, passed to |
A matrix with ranks.
S. Talts, M. Betancourt, D. Simpson, A. Vehtari and A. Gelman (2018). Validating Bayesian inference algorithms with simulation-based calibration. arXiv:1804.06788.
## Not run:
# this example takes a long time
n <- 10L # data size
dat <- data.frame(x=runif(n))
SBC_test(~ reg(~ 1 + x, prior=pr_normal(mean=c(0.25, 1), precision=1), name="beta"),
sigma.mod=pr_invchisq(df=1, scale=list(df=1, scale=1)), data=dat,
pars=list(mu="beta[1]", beta_x="beta[2]", sigma="sigma_"),
n.draws=25L, n.sim=100L*25L, thin=3L, burnin=50L
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.