Parallel tempering

Parallel tempering is implemented according to [S13]. It is an extension of the Metropolis algorithm, that start a number of parallel chains of Metropolis sampling algorithms. Each chain is run with a different temperature, and the state of each chain is allowed jump between chains according to some rules that ensure the correct probability density is sampled. This allow the sampling algorithm to better handle a posterior distribution with multiple, disconnected, areas of high probability.

The following three setting enable parallel tempering.

TEMPERING
options.mcmc.n_chains=3; % set number of chains (def=1, no multiple chains)
options.mcmc.T=[1 2 3];      % set temperature of chains [1:n_chains]
options.mcmc.chain_frequency_jump=0.1; % probability allowing a jump between two chains

options.mcmc.n_chains defines the number of chains. If not set only one chain is used, and the no parallel tempering is performed.

options.mcmc.T defines the temperature of each chain. A temperature of '1', which is the default, implies no tempering. A higher temperature allow a chain to be more exploratory.

options.mcmc.chain_frequency_jump defines the frequency with which a jump from one chain to another is suggested. A value of one means that a jump is proposed at each iteration, while a value of 0.1 (default) means that a jump is only proposed with 10 percentage probability (on average one in 10 iterations).