Notes for Handbook of MCMC
Notes on Handbook of MCMC
Authors(Editors): Steve Brooks, Andrew Gelman, Galin Jones, Xiao-li Meng
-
Check Mixing trace plot and lag plot (
acf
) -
Monte Carlo standard error (MCSE) is $\hat{\sigma}/ \sqrt{n}$ , where
-
Multistart
-
if (logr >= 0 || unif < exp(logr))
-
random walk,
y = x + e
, wheree
is symmetric distributed. -
recommended optimal acceptance rate
0.234
ford > 1
. (0.1 - 0.6) is fine. Ford = 1
, take0.44
. -
For
mcmc
R package, check mixing :plot(ts(out$batch)) acf(out$batch)
lag 25 is sufficient to make the lag under
0.2
.vignette("demo", package = "mcmc")
-
scale is tuning the variance of proposal distribution \(N(0, \sigma^2)\).
-
If $\sigma$ is too small, acceptance rate is high, not cover the whole posterior distribution . If $\sigma$ is too large, jumping around, rejecting too much. Not moving.
-
For Metropolis-within-Gibbs, for every parameter,
d = 1
. The recommended optimal acceptance rate is fine whend >= 5
. -
In Haario et al 2001, adaptive metropolis algorithm recommend the proposal distribution:
\[N(Y\_{n-1}, 2.38^{2} / d \Sigma)\]where $\Sigma$ is the sample var-cov matrix.
-
\[\delta(n) = min(0.01, 1/\sqrt{n})\]Tuning
and adaptive metropolis within gibbs . In Robert and Rosenthal, 2005, monitor every 50 samples, make $\sigma \pm \delta(n)$ if acceptance rate $\neq 0.44$ , where $\delta(n) \to 0$ , one recommended is -
Inference:
a. 3 and more parallel chains
b. discard first half (conservative)
c. mix after convergence
-
thin
-
when reporting $\theta_{\pi}$, MCSE should be included.
Notes from Steven Walker Lecture
f(y) = \int f(y | x)f(x)dx |
f(y | x) = \int f(y | u)f(u | x)du |
If f(y) = h(y)g(y), f(y, u) = I(u < h(y))g(y),
f(u | y) = h(y)^-1 I(u< h(y)) |
f(y | u) \propto g(y)I(u<h(y)) |
Instead of starting from beginning, M-H/gibbs make use of good samples, find new samples around previous one. Gibbs goes to stationary distribution by MC
\pi(mu_n+1, lambda_n+1) = \int \int pi(mu_n+1|lambda_n+1) pi(lambda_n+1|mu_n) pi( mu_n, lambda_n) dmu_n dlambda_n
q(y | x) is the proposal density, if f(y | x) is the transition density |
f(x)f(y|x) = f(y)f(x|y)
then
f(y) = \int f(y|x)f(x) dx
Methopolis Hasting
set the transition density :
f(y|x) = r(x) [a(y, x)q(y|x) /r(x)] + (1 - r(x)) I(y = x)
simplest choice of $\alpha$ is
a(y, x) = min{ 1, q(x|y)f(y)/(q(y|x)f(x))}
slice sampling
can be generalized to f(x)= g(x)h(x)