Sampling Algorithms
Version 2.10, April 2005
Andrew Thomas
1
1
Dept of Mathematics & Statistics,
University of Helsinki
Helsinki
Finland
e-mail: ant@rni.helsinki.fi
Contents
Choice of Sampling Algorithms
Description of Sampling Algorithms
Choice of Sampling Algorithm
[top]
When OpenBUGS starts up a file called
methods.txt
in /Updater/Rsrc is read. The modules implementing the sampling methods listed in this file are then loaded dynamically. Factory objects to create updater objects which use these methods are stored in an array (in the same order as in the file). The first factory object in this array is used to create updaters for all the stochastic nodes in the model that need updating and for which the associated sampling method is valid. If there are any nodes which do not have updater objects created by this first factory the seond factory is tried and so on. In this way only a single updater object is created for each node that needs sampling. If non of the factories are able to create an updater object for a node in the model that needs sampling an error is reported. It is the function of the factory to decide if its associate sampling method is valid for a particular node in the model. Factory objects associated with sampling algorithms listed at the start of the methods file can impose strict conditions on the node for which they are able to create an updater object. In general algorithms at the start of the methods file do block updating of nodes. Users can develope special purpose sampling algorithms and place them at the start of the methods file. Algorithms towards the end of the method file tend to be general purpose (and somewhat less efficient) than earlier algorithms.
The methods file can contain comments. If the algorithm occurs after a comment symbol (the #) it is not loaded or used. An algorithm might be commented out because it is less efficient than a competing algorithm, because it performs badly in some test situations, because it causes less efficient algorithms to be chosen for other nodes or because it has not been tested enough. Users are enouraged to try some of the commented out algorithms and to report their good and bad experiences.
Description of Sampling Algorithm
[top]
UpdaterMVNormal.Install
Gibbs type of updater for multivariate normal conditional distribution where each term in the likelihood is either normal, log normal or multivariate normal of same dimension as the prior with a unit link function.
UpdaterMVNLinear.Install
As for UpdaterMVNormal.Install but the likelihood can have terms that are multivariate normal of a different dimension to the prior and the link function does not have to be the identity but can have a linear form.
UpdaterGLM.InstallNormal
Gibbs type of updater for multivariate conditional distribution where the prior is a set of univariate normal nodes. Not currently used.
UpdaterWishart.Install
Gibbs type of updater for conditional distributions that is a wishart.
UpdaterDirichlet.Install
Gibbs type of updater for a conditional distribution that is dirichlet.
UpdaterDirichletprior.Install
Slice sampler type of updater for a conditional distribution that has a dirichlet prior.
UpdaterMultinomial.Install
Independence Metropolis utype of updater for a conditional distribution that has a multinomial prior.
UpdaterGLM.InstallGLM
Metropolis Hastings type updater for a block of nodes which have either a log-linear or logistic conditional distribution with unbounded support.
UpdaterDFreeHybrid.Install
Metropolis type of updater for a block of nodes which has a generic conditional distribution with unbounded support. Proposal distribution is based on integration of Hamiltons equations of classical mechanics. Derivatives of log likelihood are calculated numericaly. Not currently used.
UpdaterAMblock.InstallHomo
Current point Metropolis type updater with delayed rejection and continously adapted multivariate normal proposal distribution. For a block of nodes which has a generic conditional distribution. Non markov algorithm. Not currently used.
UpdaterAMblock.InstallHetro
Current point Metropolis type updater with delayed rejection and continously adapted multivariate normal proposal distribution. For a block of nodes the first element of which has a generic conditional distribution. Non markov algorithm. Not currently used.
UpdaterHybridglm.Install
Metropolis type of updater for a block of nodes which has a normal, log-linear or logistic conditional distribution with unbounded support. Proposal distribution is based on integration of Hamiltons equations of classical mechanics. Used for random effects. Not currently used.
UpdaterNormal.Install
Gibbs type of updater for univariate normal conditional distribution.
UpdaterGamma.Install
Gibbs type of updater for gamma conditional distribution.
UpdaterBeta.Install
Gibbs type of updater for beta conditional distribution.
UpdaterPareto.Install
Gibbs type of updater for pareto conditional distribution.
UpdaterPoisson.Install
Gibbs type of updater for poisson prior with single binomial likelihood term having order equal to the prior.
UpdaterForward.Install
Gibbs type of updater for univariate node which does not have any likelihood.
UpdaterCatagorical.Install
Gibbs type of updater for univariate node which takes descrete values with a upper bound. Works by enumeration.
UpdaterMetbinomial.Install
Current point Metropolis type updater for univariate node which takes descrete values with no upper bound.
UpdaterRejection.Install
Gibbs type of updater for univariate node with log-linear or logistic distribution and unbounded support.
UpdaterSCAM.InstallDelayed
Current point Metropolis type updater for generic univariate distribution with unbounded support. Uses a continously adapted normal proposal distribution. Non markov algorithm. Not currently used.
UpdaterMetnormal.InstallDelayed
Current point Metropolis type updater for generic univariate distribution with unbounded support. Uses a normal proposal distribution that is adapted during a tunning phase.
UpdaterGriddy.Install
Independene Metropolis Hastings type updater for generic univariate distribution. Distribution must have bounded support. Builds a trapizoidal approximation to the conditional to use as the proposal. Slow algorithm. Not currently used, slice sampling is prefered but see note below about multimodality.
UpdaterSlice.Install
Slice type of updater for generic univariate distribution. Uses steping out search procedure to find the slice. Step length of search procedure adapted during tunning phase. Can miss modes in multimodal onditional distribution.