Description Usage Arguments Details Value Author(s) References
TEST Implementation of DREAM
1 2 3 4 |
prior |
A function(N,d) that draws N samples from a d-variate prior distribution. Returns an N-by-d matrix. |
pdf |
A function(prior) that calculates the log-density of the target distribution for given prior. Returns an N-variate vector. |
nc |
|
t |
|
d |
|
burnin |
|
adapt |
|
updateInterval |
|
delta |
|
c_val |
|
c_star |
|
nCR |
|
p_g |
|
beta0 |
|
thin |
|
checkConvergence |
|
ncores |
|
verbose |
|
DEBUG |
|
To understand the notation (e.g. what is lambda, nCR etc.), have a look at Sect. 3.3 of the reference paper (see below).
list
with named elements:
chain: a (1-burnin)*t/thin-by-d-by-nc array of parameter realisations for each iteration and Markov chain;
density: a (1-burnin)*t/thin-by-nc matrix of log-densities computed by pdf
at each iteration for each Markov chain;
runtime: time of function execution in seconds;
outlier: a list with adapt*t vectors of outlier indices in nc (value of 0 means no outliers);
AR: a (1-burnin)*t/thin-by-nCR matrix giving the acceptance rate for each sample number and crossover value (first element is NA due to computational reasons);
CR: a (1-burnin)*t/thin-by-nCR matrix giving the selection probability for each sample number and crossover value (first element is NA due to computational reasons);
R_stat: if checkConvergence == T
a (1-burnin)*t/thin-50-by-d matrix giving the Gelman-Rubin convergence diagnostic
(note that at least 50 observations are used to compute R_stat). Otherwise NULL
.
IF DEBUG == TRUE:
DEBUG: a list with the elements:
J: a t-by-nCR matrix of cumulated Euclidean jump distances during the Markov chain progressing;
dx: a t-by-nc-by-d array of jump proposals;
dx_eff: a t-by-nc-by-d array of accepted jumps;
std: a t-by-d matrix of standard deviations of the chain for each parameter. Note: J_i = J_i-1 + sum( (dx_eff_i/std_i)^2 );
gamma: a t-by-nc matrix of jump rate values;
lambda: a t-by-nc-by-d array of lambda values;
zeta: a t-by-nc-by-d array of zeta values;
jump_diff: a t-by-nc-by-d array of jump differentials ( sum(X_a - X_b) ).
Tobias Pilz tpilz@uni-potsdam.de
Code based on 'Algorithm 5' and 'Algorithm 6' of:
Vrugt, J. A.: "Markov chain Monte Carlo simulation using the DREAM software package: Theory, concepts, and MATLAB implementation." Environmental Modelling & Software, 2016, 75, 273 – 316, http://dx.doi.org/10.1016/j.envsoft.2015.08.013.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.