Description Usage Arguments Details Value Note Author(s) References
View source: R/dream_parallel.R
Implementation of the DREAM algorithm, including variations (such as DREAM(zs) and DEAM(ABC)) depending on certain argument settings.
| 1 2 3 4 5 6 7 8 9 | dream_parallel(fun, ..., lik = NULL, par.info = list(initial = NULL, min =
  NULL, max = NULL, mu = NULL, cov = NULL, val_ini = NULL, bound = NULL, names =
  NULL, prior = "flat"), nc, t, d, burnin = 0, adapt = 0.1,
  updateInterval = 10, delta = 3, c_val = 0.1, c_star = 1e-12,
  nCR = 3, p_g = 0.2, beta0 = 1, thin = 1, outlier_check = TRUE,
  obs = NULL, abc_rho = NULL, abc_e = NULL, glue_shape = NULL,
  lik_fun = NULL, past_sample = FALSE, m0 = NULL, archive_update = NULL,
  psnooker = 0, mt = 1, ncores = 1, checkConvergence = FALSE,
  verbose = TRUE)
 | 
| fun | 
 | 
| ... | Additional arguments for  | 
| lik | 
 | 
| par.info | A  | 
| nc | 
 | 
| t | 
 | 
| d | 
 | 
| burnin | 
 | 
| adapt | 
 | 
| updateInterval | 
 | 
| delta | 
 | 
| c_val | 
 | 
| c_star | 
 | 
| nCR | 
 | 
| p_g | 
 | 
| beta0 | 
 | 
| thin | 
 | 
| outlier_check | 
 | 
| obs | 
 | 
| abc_rho | 
 | 
| abc_e | 
 | 
| glue_shape | 
 | 
| lik_fun | 
 | 
| past_sample | 
 | 
| m0 | 
 | 
| archive_update | 
 | 
| psnooker | 
 | 
| mt | 
 | 
| ncores | 
 | 
| checkConvergence | 
 | 
| verbose | 
 | 
| initial | 
 | 
| min | 
 | 
| max | 
 | 
| mu | 
 | 
| cov | 
 | 
| val_ini | 
 | 
| bound | 
 | 
| names | 
 | 
| prior | 
 | 
To understand the notation (e.g. what is lambda, nCR etc.), have a look at Sect. 3.3 of the reference paper (see below).
Likelihood options (argument lik):
1: fun returns the likelihood of parameter realisation x given some observations.
2: fun returns the log-likelihood.
21: ABC diagnostic model evaluation using a continuous fitness kernel, a variation of so-called noisy-ABC.
22: ABC diagnostic model evaluation using a Boxcar likelihood. fun has to return m diagnostic values
to be compared with observations. Requires arguments obs, abc_rho, and abc_e. Modification
in computation of Metropolis probability is used (Eq. 13 of Sadegh and Vrugt, 2014). Prior pdf set to zero!
31: GLUE with informal likelihood function based on the NSE: glue_shape * log(NSE). fun needs to
return a time series of model simulations and obs should contain a time series of corresponding observations.
glue_shape affects the sampling: small values result in high parameter uncertainty, large values produce
narrow posterior pdfs of parameters. Should be in the range of 1-100 (experiment!).
99: A user-defined function, see argument lik_fun.
list with named elements:
chain: a (1-burnin)*t/thin-by-d+3-by-nc array of parameter realisations and the log-pdfs of the prior ('lp'), likelihood ('ll'), and posterior ('lpost') distribution for each iteration and Markov chain;
fx: a (1-burnin)*t/thin-by-nc-by-[length of fun's output] array of raw output of fun,
corresponds with parameter realisations in chain;
runtime: time of function execution;
outlier: a list with adapt*t vectors of outlier indices in nc (value of 0 means no outliers);
AR: a [floor(t/updateInterval)+1]-by-2 matrix giving the total number of proposal evaluations an the
associated acceptance rate averaged over the last updateInterval * nc evaluations.
CR: a [floor(t/updateInterval)+1]-by-[nCR+1] matrix giving the total number of proposal evaluations
(first column) an the current selection probability for each of the nCR crossover values.
IF checkConvergence == TRUE:
R_stat: a (1-burnin)*t/thin-50+1-by-d matrix giving the Gelman-Rubin convergence diagnostic (note that at least 50 observations are used to compute R_stat).
If you want to use a non-implemented likelihood function with nuisance variables to be calibrated along
with the actual model parameters, it is suggested to implement the likelihood calculation directly into fun.
Tobias Pilz tpilz@uni-potsdam.de
Code based on:
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.
For ABC method see:
Sadegh, M. and J. A. Vrugt: "Approximate Bayesian computation using Markov Chain Monte Carlo simulation: DREAM_ABC". Water Resources Research, 2014, 50, 6767 – 6787, http://dx.doi.org/10.1002/2014WR015386.
For MT-DREAM(ZS) see:
Laloy, E. and J. A. Vrugt: "High-dimensional posterior exploration of hydrologic models using multiple-try DREAM(ZS) and high-performance computing". Water Resources Research, 2012, 48, W01526, http://dx.doi.org/10.1029/2011WR010608.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.