unlike for metrop must be a function or missing;
if missing the identity function, function(x) x, is used.
debug
see metrop.
morph
morph object used for transformations. See morph.
...
see metrop.
Details
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.)
Value
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.
References
Johnson, L. T. and Geyer, C. J. (submitted)
Variable Transformation to Obtain Geometric Ergodicity
in the Random-walk Metropolis Algorithm.
See Also
metrop, morph.
Examples
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