Object representing the results of MCMC estimation on an
object of class
synlik, from which it inherits.
initial parameters where the MCMC chain will start
Number of MCMC iterations
Number of simulations from
the simulator at each step of the MCMC algorithm
Number of initial MCMC
iterations that are discarded (
Function that takes a vector of
parameters as input and the log-density of the prior as
output. If the output is not finite the proposed point
will be discarded. (
function). The function needs
to have signature
fun(x, ...), where
represents the input parameters (
Matrix representing the covariance matrix
to be used to perturb the parameters at each step of the
MCMC chain (
rate for the adaptive MCMC sampler. Should be in (0, 1),
default is NULL (no adaptation). The adaptation uses the
approach of Vihola (2011). (
If TRUE the synthetic likelihood will be
evaluated at the current and proposed positions in the
parameter space (thus doubling the computational effort).
If FALSE the likelihood of the current position won't be
functions will be executed in parallel. That is the nsim
simulations will be divided in multiple cores
Number of cores to use
if multicore == TRUE (
Acceptance rate of the MCMC chain, between
0 and 1 (
Matrix of size
niter by length(initPar) where the i-th row contains the
position of the MCMC algorithm in the parameter space at
the i-th (
niter elements where the i-th element is contains the
estimate of the synthetic likelihood at the i-th
Control parameters used by the MCMC sampler:
theta = controls the speed of adaption.
Should be between 0.5 and 1. A lower gamma leads to
adaptStart = iteration
where the adaption starts. Default 0.
adaptStop = iteration where the adaption
burn + niter
= path to the file where the intermediate results will be
stored (ex: "~/Res.RData").
frequency with which the intermediate results will be
saveFile. Default 100.
verbose = if
posterior means will be printer.
frequency with which the intermediate posterior means
will be printer. Default 500.
Matteo Fasiolo <firstname.lastname@example.org>
Vihola, M. (2011) Robust adaptive Metropolis algorithm with coerced acceptance rate. Statistics and Computing.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
# Load "synlik" object data(ricker_sl) plot(ricker_sl) # MCMC estimation set.seed(4235) ricker_sl <- smcmc(ricker_sl, initPar = c(3.2, -1, 2.6), niter = 50, burn = 3, priorFun = function(input, ...) 1, propCov = diag( c(0.1, 0.1, 0.1) )^2, nsim = 200, multicore = FALSE) # Continue with additional 50 iterations ricker_sl <- continue(ricker_sl, niter = 50) plot(ricker_sl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.