Setting the tempering parameter of (‘tempered’)
bspec
objects.
temper(x, ...)
# S3 method for bspec
temper(x, temperature = 2, likelihood.only = TRUE, ...)
a bspec
object.
a (positive) ‘temperature’ value.
a logical
flag indicating whether to
apply the tempering to the ‘complete’ posterior density, or
to the likelihood only (default).
currently unused.
An object of class bspec
(see the help for the bspec
function),
but with an additional temperature
element.
In the context of Markov chain Monte Carlo (MCMC) applications it is
often desirable to apply tempering to the distribution of
interest, as it is supposed to make the distribution more easily
tractable. Examples where tempering is utilised are simulated
annealing, parallel tempering or evolutionary MCMC
algorithms. In the context of Bayesian inference, tempering may be
done by specifying a ‘temperature’
Roever, C. Bayesian inference on astrophysical binary inspirals based on gravitational-wave measurements. PhD thesis, Department of Statistics, The University of Auckland, New Zealand, 2007.
# NOT RUN {
lhspec <- bspec(lh, priorscale=0.6, priordf=1)
# details of the regular posterior distribution:
str(lhspec)
# details of the tempered distribution
# (note the differing scale and degrees-of-freedom):
str(temper(lhspec, 1.23))
# }
Run the code above in your browser using DataLab