This is an interactive demo written in Python showing how the Dominated Coupling from the Past algorithm for Monte Carlo perfect simulation draws samples from the equilibrium distribution of an autoregressive model. See Kendall (2005) for a recent and comprehensive tutorial on perfect simulation including Dominated CFTP. In this demo two bounding AR processes define the minimal and maximal states. A variable number of chains is started at time -T, are evolved forward in time and checked for coalescence at time t=0. If coalesce does not happen, the simulation can be manually restarted further back in the past, at time -2T. The coupling mechanism implements ideas similar to slice sampling. The user can control the AR coefficient and the number of Markov chains, restart the simulation further back into the past, inspect the sampled points, and generate a file containing a random sample from the equilibrium distribution.
Installation and Usage
Run the script with
G. Montana (2002). Small sets and domination in perfect simulation. Ph.D. Thesis. University of Warwick
W.S. Kendall (2005). Notes on Perfect Simulation. Research Report 428. University of Warwick