Description Usage Arguments Value Examples
Given black-box functions prior_draw
, data_draw
, and posterior_draw
,
checks that the joint distribution of the prior and data match the joint distribution
of the posterior and data.
Draws a number of (parameter, data, posterior) triplets
and then partitions data into clusters.
Checks that the first two moments of the parameter are consistent with the
first two moments of the posterior within each cluster.
1 2 | posterior_check(prior_draw, data_draw, posterior_draw, n = 1000, k = 10,
mc.cores = 1)
|
prior_draw |
function() which produces a parameter vector |
data_draw |
function(theta) which produces data vector |
posterior_draw |
function(x) which produces |
n |
Number of (theta, x) samples to draw |
k |
Number of clusters to split the data |
mc.cores |
Number of parallel cores to use |
List with global p-value for equality of posterior and prior in each of k clusters, as well as generated data and clusters
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.