temper {bspec} | R Documentation |
Tempering of (posterior) distributions
Description
Setting the tempering parameter of (‘tempered’)
bspec
objects.
Usage
temper(x, ...)
## S3 method for class 'bspec'
temper(x, temperature = 2, likelihood.only = TRUE, ...)
Arguments
x |
a |
temperature |
a (positive) ‘temperature’ value. |
likelihood.only |
a |
... |
currently unused. |
Details
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’ T
and then
manipulating the original posterior distribution
p(\theta|y)
by applying an exponent
\frac{1}{T}
either to the complete posterior distribution:
p_T(\theta) \propto p(\theta|y)^\frac{1}{T}%
= (p(y|\theta)p(\theta))^\frac{1}{T}
or to the likelihood part only:
p_T(\theta) \propto p(y|\theta)^\frac{1}{T}p(\theta).
In this context, where the posterior distribution is a product of
scaled inverse \chi^2
distributions, the
tempered distributions in both cases turn out to be again of the same
family, just with different parameters. For more details see also the
references.
Value
An object of class bspec
(see the help for the bspec
function),
but with an additional temperature
element.
Note
Tempering with the likelihood.only
flag set to FALSE
only works as long as the temperature
is less than
min((x$df+2)/2)
.
Author(s)
Christian Roever, christian.roever@med.uni-goettingen.de
References
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.
See Also
Examples
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))