These functions are used to define the elements $chain of the MCMC algorithms
that are (and must be) implemented as lists in EntropyMCMC.
These functions are usually only called by higher-level functions, see details below.
RWHM_chain(theta0, it = 100, target, f_param, q_param, q_pdf = gaussian_pdf,
q_proposal = gaussian_proposal)
HMIS_norm_chain(theta0, it = 100, target, f_param, q_param, q_pdf = q_pdf_ISnorm,
q_proposal = q_proposal_ISnorm)
AMHaario_chain(theta0, it = 100, target, f_param, q_param, q_pdf = gaussian_pdf,
q_proposal = gaussian_proposal)
IID_chain(theta0 = NULL, it = 100, target, f_param, q_param = NULL, q_pdf = NULL,
q_proposal = NULL)the number of iterations to simulate
the initial position of the chain, a \(d\)-dim vector
the user-defined target density
the parameters (hyperparameters, data) of the user-defined target density
the parameters of the proposal density, which structure depends on the algorithm and the proposal density chosen by the user. Defaults are
for RWHM: a list with the mean and covariance matrix of the proposal.
For AMHaario: a list that must contain three elements:
v the initial covariance matrix, t0 the iteration of the end of initial stage
with that matrix, and epsi the epsilon parameter (for the nondegenerate matrix part),
see Haario et. al.(2001).
the proposal density
the function simulating the proposal for the next move
A list with elements:
the simulated chain in an array of \(it\) rows and \(d\) columns (the dimension)
the empirical acceptance rate
the last covariance matrix
the name of the algorithm (for plot methods)
Each MCMC algorithm is defined as a list with five elements, see
the object RWHM for an example. The element $chain must provide
the name of the function performing simulation of a single chain and returning that chain,
with arguments that must follow the definition above.
Each user can define its own MCMC
starting with the algorithms provided (see also section below).
These functions are thus usually called by higher-level functions like
MCMCcopies, EntropyParallel, or their multicore versions,
for simulating copies of MCMC chains in an automatic manner.
RWHM_chain is used in RWHM, a standard Randow-Walk Hastings-Metropolis algorithm.
HMIS_norm_chain is used in HMIS_norm,
an Independence Sampler HM with gaussian proposal
AMHaario_chain is used in AMHaario, the
Haario Adaptive Hastings-Metropolis algorithm (Haario 2001), and is provided as an example
of a benchmark AMCMC.
IID_chain is used in IID_norm, a “fake” MCMC that is just a gaussian IID sampler.
H. Haario, E. Saksman, and J. Tamminen (2001), An adaptive Metropolis algorithm. Bernoulli 7, 223--242.
The algorithm already implemented, listed in EntropyMCMC-package.
The higher level functions that use these functions for simulation:
MCMCcopies, EntropyParallel and their multicore versions.