The Metropolis–Hastings algorithm is useful when a target posterior can be evaluated up to a normalizing constant but direct independent sampling or simple conditional sampling is unavailable. It constructs a Markov chain with that posterior as invariant law. After adequate convergence, averages of functions of the chain estimate posterior expectations, and the retained draws approximate marginal distributions, quantiles and credible intervals.
For the random-walk Metropolis algorithm, at current propose , where has a symmetric distribution, often . With a symmetric proposal the acceptance probability is
Accept the proposal when an independent uniform is below this probability; otherwise retain the current value. For a nonsymmetric proposal , include in the ratio. Detailed balance follows because the accepted flow is the minimum of the two proposed directional flows; rejection supplies the remaining self-transition probability. Irreducibility, appropriate recurrence and aperiodicity are also needed for convergence.
In the displayed trace plots, the first parameter moves in small increments with pronounced long-term wandering and a shift from its early region to a later region. This is consistent with an undersized proposal or a strongly correlated slow direction. Measure its acceptance rate: if it is very high, increase that coordinate's proposal variance. The second parameter moves rapidly within regions but changes its level around iteration 4500; that is evidence against treating the full run as a settled stationary sample, and it suggests investigating dependence with the first parameter or separated posterior regions. Its local scale may already be reasonable, so a blanket reduction of all proposal variances would be unwarranted. The third parameter has conspicuous long plateaus, indicating many repeated states: if the recorded acceptance is low, reduce its proposal variance; also check constraints and dependence before deciding that scale alone is the cause.
Rerun with coordinate-specific scale changes, inspect joint dependence, consider a covariance-based block proposal, and run longer chains from dispersed starting points. The MCMC trace diagnosis and proposal tuning should include actual acceptance rates and effective sample sizes; the three marginal trace plots do not by themselves identify correlations or prove convergence. Further practical details are in the three subparts.
Convergence means that the chain's distribution approaches the intended posterior, independently of its initial state, under the relevant ergodicity assumptions. It is separate from obtaining enough effectively independent draws for a precise answer. Start several chains at dispersed plausible points, examine trace plots and stability of posterior summaries, compare between-chain and within-chain variation, and inspect autocorrelation and effective sample size of a Markov chain. Discard an initial transient when appropriate and report Monte Carlo uncertainty.
No finite diagnostic proves convergence. Agreement among chains started in the same basin can miss another mode. If different starting points give incompatible summaries, extend runs or improve proposals rather than merely deleting more observations. Extra thinning does not repair poor exploration; retaining all post-transient draws usually preserves more information for estimating uncertainty.
Single-component updates propose one coordinate while holding the others fixed, with acceptance based on the resulting target ratio. They are cheap and permit individual scale tuning, but can crawl along a narrow correlated ridge. Block updates propose several coordinates jointly and can follow posterior covariance directions, potentially improving mixing substantially.
A practical compromise uses small correlated blocks, or a full Gaussian block with covariance estimated in a pilot run and rescaled for acceptance. Blocking independent coordinates need not help, and a badly scaled high-dimensional block may be rejected frequently. Compare computing cost per effective draw, rather than acceptance rate alone. A Metropolis-within-Gibbs sweep of coordinate updates and a properly accepted block update both preserve the target.
Small random-walk proposal variance gives many accepted tiny moves and strong autocorrelation; excessive variance proposes mostly low-density points, giving low acceptance and long rejection plateaus. Tune each coordinate or block during a pilot run to balance movement and acceptance, and inspect effective sample size per unit computation. Rescale or transform parameters with very different units, and account for posterior correlation rather than adjusting only diagonal variances.
There is no universal optimal acceptance percentage for every target or update dimension. Keep the chosen proposal fixed in the production run, or use an adaptive method with a proved diminishing-adaptation and containment justification. The direction of the trace-based changes for this particular run is given in the parent solution.

Articles by others on the same topic (0)

There are currently no matching articles.