IRIS Toolbox Reference Manual

arwm

Adaptive random-walk Metropolis posterior simulator

Syntax

[Theta,LogPost,AR,Scale,FinalCov] = arwm(Pos,NDraw,...)

Input arguments

Output arguments

Options

Description

Use the poster/stats function to process the simulated chain of parameters, and calculate selected statistics.

Parallelised ARWM

Set 'nStep=' greater than 1, and 'firstPrefetch=' smaller than NDraw to start a pre-fetching parallelised algorithm (pre-fetched will be all draws starting from 'firstPrefetch='); to that end, a pool of parallel workers (using e.g. matlabpool from the Parallel Computing Toolbox) must be opened before calling arwm.

With pre-fetching, all possible paths 'nStep=' steps ahead (i.e. all possible combinations of reject/accept) are pre-evaluated in parallel, and then the resulting path is selected. Adapation then occurs only every 'nStep=' steps, and hence the results will always somewhat differ from a serial run. Identical results can be obtained by turning down adaptation before pre-fetching starts, i.e. by setting 'lastAdapt=' smaller than 'firstPrefetch=' (and, obviously, by re-setting the random number generator).

References

  1. Brockwell, A.E., 2005. "Parallel Markov Chain Monte Carlo Simulation by Pre-Fetching," CMU Statistics Dept. Tech. Report 802.

  2. Strid, I., 2009. "Efficient parallelisation of Metropolis-Hastings algorithms using a prefetching approach," SSE/EFI Working Paper Series in Economics and Finance No. 706.

Example