Morphometric Metropolis Algorithm
Markov chain Monte Carlo for continuous random vector using a Metropolis algorithm for an induced density.
morph.metrop(obj, initial, nbatch, blen = 1, nspac = 1, scale = 1, outfun, debug = FALSE, morph, ...)
obj |
see |
initial |
see |
nbatch |
see |
blen |
see |
nspac |
see |
scale |
see |
outfun |
unlike for |
debug |
see |
morph |
morph object used for transformations. See |
... |
see |
morph.metrop
implements morphometric methods for Markov
chains. The caller specifies a log unnormalized probability density
and a transformation. The transformation specified by the
morph
parameter is used to induce a new log unnormalized
probability density, a Metropolis algorithm is
run for the induced density. The Markov chain is transformed back to
the original scale. Running the Metropolis algorithm for the induced
density, instead of the original density, can result in a Markov chain
with better convergence properties. For more details see Johnson and Geyer
(submitted). Except for morph
, all parameters are
passed to metrop
, transformed when necessary. The
scale
parameter is not transformed.
If X is a real vector valued continuous random variable, and Y = f(X) where f is a diffeomorphism, then the pdf of Y is given by
fY(y) = fX(f^{-1}(y)) | del f^{-1}(y) |
where fX is
the pdf of X and del f^{-1} is the Jacobian
of f^{-1}. Because f is a diffeomorphism, a Markov chain
for fY may be transformed into a Markov chain for
fX. Furthermore, these Markov chains are isomorphic
(Johnson and Geyer, submitted) and have the same convergence rate.
The morph
variable provides a diffeomorphism,
morph.metrop
uses this diffeomorphism to induce the log
unnormalized density, log fY based on the user
supplied log unnormalized density, log fX.
morph.metrop
runs a Metropolis algorithm for log
fY and transforms the resulting Markov chain into a Markov chain for
fX. The user accessible output components are the same as
those that come from metrop
, see the documentation for
metrop
for details.
Subsequent calls of morph.metrop
may change to the
transformation by specifying a new value for morph
.
Any of the other parameters to morph.metrop
may also be
modified in subsequent calls. See metrop
for more details.
The general idea is that a random-walk Metropolis sampler
(what metrop
does) will not be geometrically
ergodic unless the tails of the unnormalized density decrease
superexponentially fast (so the tails of the log unnormalized density
decrease faster than linearly). It may not be geometrically ergodic
even then (see Johnson and Geyer, submitted, for the complete theory).
The transformations used by this function (provided by morph
)
can produce geometrically ergodic chains when the tails of the log
unnormalized density are too light for metrop
to do so.
When the tails of the unnormalized density are exponentially light but
not superexponentially light (so the tails of the log unnormalized density
are asymptotically linear, as in the case of exponential family models
when conjugate priors are used, for example logistic regression, Poisson
regression with log link, or log-linear models for categorical data), one
should use morph
with b = 0
(the default), which
produces a transformation of the form g1 in the notation
used in the details section of the help for morph
.
This will produce a geometrically ergodic sampler if other features of the
log unnormalized density are well behaved. For example it will do so
for the exponential family examples mentioned above.
(See Johnson and Geyer, submitted, for the complete theory.)
The transformation g1 behaves like a shift transformation
on a ball of radius r
centered at center
, so these arguments
to morph
should be chosen so that a sizable proportion of
the probability under the original (untransformed) unnormalized density
is contained in this ball. This function will work when r = 0
and
center = 0
(the defaults) are used, but may not work as well as when
r
and center
are well chosen.
When the tails of the unnormalized density are not exponentially light
(so the tails of the log unnormalized density decrease sublinearly, as
in the case of univariate and multivariate t distributions), one
should use morph
with r > 0
and p = 3
, which
produces a transformation of the form g2 composed
with g1 in the notation
used in the details section of the help for morph
.
This will produce a geometrically ergodic sampler if other features of the
log unnormalized density are well behaved. For example it will do so
for the t examples mentioned above.
(See Johnson and Geyer, submitted, for the complete theory.)
an object of class mcmc
, subclass morph.metropolis
.
This object is a list containing all of the elements from an object
returned by metrop
, plus at least the following
components:
morph |
the morph object used for the transformations. |
morph.final |
the final state of the Markov chain on the transformed scale. |
Johnson, L. T. and Geyer, C. J. (submitted) Variable Transformation to Obtain Geometric Ergodicity in the Random-walk Metropolis Algorithm.
out <- morph.metrop(function(x) dt(x, df=3, log=TRUE), 0, blen=100, nbatch=100, morph=morph(b=1)) # change the transformation. out <- morph.metrop(out, morph=morph(b=2)) out$accept # accept rate is high, increase the scale. out <- morph.metrop(out, scale=4) # close to 0.20 is about right. out$accept
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.