Description Usage Arguments Details Value
Sample and compute BF for various models using Stan.
1 2 3 4 5 6 7 8 9 10 11 12 | compute_BF_Stan(
data,
model,
hyperpriors,
n.iter = 1000,
n.burnin = 200,
n.chains = 1,
n.cores = 1,
data_other = NULL,
silent = FALSE,
...
)
|
data |
a list containing |
model |
the model shortname (e.g. |
hyperpriors |
a list containing hyperparameter definitions |
n.iter |
number of HMC iterations (default: 1000) |
n.burnin |
number of HMC burn-in iterations (default: 200) |
n.chains |
number of HMC chains (default: 1) |
n.cores |
number of cores to use for HMC and bridge sampling (default: 1) |
data_other |
a list containing additional data for H_1 and H_2 models (default: |
silent |
if TRUE, do not print any progress |
... |
list of additional parameters to pass to |
Two-sample model:
samples are stored as matrix mtx
reference items are indexed in mtx
by idx.ref
questioned items are indexed in mtx
by idx.quest
other items, non indexed, are discarded.
Hypotheses:
H_1: samples in idx.ref
and idx.quest
come from the same source
H_2: samples in idx.ref
and idx.quest
come from different sources
Return a stanBF
object with these properties:
model_name
stanmodel
(named list of Stan models)
stanfit
(named list of stanfit
objects)
stanbridge
(named list of bridgesampler
objects)
BF
(a double: the Bayes Factor)
For Dirichlet likelihoods, the returned object is a stanBF_turn
, inheriting from stanBF
.
These objects contain also:
df_samples
(data.frame with posterior samples)
custom plot methods
The object contains methods to plot and to extract samples.
a stanBF
object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.