11.6.2.1. Chosing the MCMC algorithm

Several MCMC algorithms are available, and the desired algorithm can be selected using the setAlgo method, which has the following prototype:

setAlgo(algoMCMC)

The method takes a single string argument that specifies the algorithm to use. Currently, the following options are supported:

  • Component-wise Metropolis–Hastings, specified with “MH_1D”. This method updates one parameter at a time, which is useful when parameters have different influences on the model. By generating new candidates along one direction at a time, it prevents less influential parameters from being overshadowed by the more influential ones. This approach is generally slower than the classic Metropolis–Hastings;

  • Classic Metropolis–Hastings, specified with “MH_multiD” (default algorithm). This method generates candidates in all directions simultaneously, making it faster than the component-wise approach, but it may be less efficient when parameter influences vary widely.

Warning

As explained, this method should be done immediately after creating the TMCMC object and assigning its likelihood.