View source: R/core_bayes_estimate.R
| estimate_bayes_h | R Documentation |
Estimate group-level and individual-level parameters with a hierarchical Bayesian approach using Differential Evolution MCMC (DE-MCMC) \insertCiteTurneretal.2013;textualdRiftDM. An approximation of the marginal likelihood to calculate Bayes Factors can be obtained with the Thermodynamic Integration via Differential Evolution (TIDE) sampler \insertCiteEvansAnnis2019;textualdRiftDM.
estimate_bayes_h(
drift_dm_obj,
obs_data_ids,
sampler,
n_chains,
burn_in,
samples,
n_cores,
prob_migration,
prob_re_eval,
verbose,
seed = NULL,
...
)
estimate_bayes_one_subj(
drift_dm_obj,
sampler,
n_chains,
burn_in,
samples,
prob_migration,
prob_re_eval,
verbose,
...
)
drift_dm_obj |
an object of type drift_dm. |
obs_data_ids |
data.frame for the hierarchical case. An additional column ID is necessary that codes the individuals (see also obs_data). |
sampler |
character string, indicating the sampler to use.
Must be either |
n_chains |
numeric, number of chains for the MCMC-sampler.
Default is |
burn_in |
numeric, number of burn-in iterations. Default is |
samples |
numeric, number of sampling iterations after burn-in.
Default is |
n_cores |
numeric, number of threads to use for parallel processing in
the hierarchical case. Default is |
prob_migration |
numeric, probability of performing a migration
crossover step during burn-in. Default is |
prob_re_eval |
numeric, probability of re-evaluating the
likelihood/posterior values of the previous iteration |
verbose |
integer, indicating verbosity of output: 0 (none),
1 (minimal text output), or 2 (text output and progress bar). Default is |
seed |
optional random seed for reproducibility. |
... |
additional arguments passed to get_default_prior_settings to customize prior settings. |
The function estimate_bayes_h() handles the hierarchical case. The function
estimate_bayes_one_subj() handles the case for estimating a single
individual. The reason for writing two functions is that the hierarchical
case has some unique tweaks to it that need to be considered ... and writing
one function would be quite the mess.
Prior Settings: See the wrapper estimate_bayesian() and
also get_default_prior_settings()
A named ist containing posterior samples for
group-level and individual-level parameters, log-posterior values,
and log-likelihoods. Labels: phi, pis_phi, lls_phi, theta,
pis_theta, lls_theta. The first three entries are only present in the
hierarchical case.
The list also has an additional attribute named data_model. In the
hierarchical case, the attribute contains a named list of model copies
with all the individual data sets attached. The list is named according to
the individual IDs in the argument obs_data_ids. In the
non-hierarchical case, the attribute contains the model and its attached
data.
Turneretal.2013dRiftDM \insertRefEvansAnnis2019dRiftDM
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.