RWHM_chain {EntropyMCMC} R Documentation

## Simulating MCMC single chains using MCMC algorithms

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. ### Usage 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)  ### Arguments  it the number of iterations to simulate theta0 the initial position of the chain, a d-dim vector target the user-defined target density f_param the parameters (hyperparameters, data) of the user-defined target density q_param 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). q_pdf the proposal density q_proposal the function simulating the proposal for the next move ### Details 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.

### Value

A list with elements:

 theta the simulated chain in an array of it rows and d columns (the dimension) paccept the empirical acceptance rate finalcov the last covariance matrix algo the name of the algorithm (for plot methods)

Didier Chauveau.

### References

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.