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 isAccept 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.
For each observation time, use only the currently susceptible risk set , with new-infection indicators . PutThis is the spatial Bernoulli infection model, under conditional independence of the indicators. Distances must be positive. Already infected trees should not be included as new susceptible trials. The minus sign in the power kernel is present in the original PDF, although it is absent in the converted TeX.
The parameter must be nonnegative: for and positive exposure, is not a probability. Therefore the stated unrestricted normal prior distribution cannot literally define the model. A coherent interpretation is a normal prior distribution restricted to ,Here is the standard normal distribution function. Use the same proper prior distribution in both kernel models. The given Gaussian prior distributions for and are mathematically valid on the real line for finite positive distances, though restricting them to positive values would impose decaying kernels and would require the corresponding normalized prior distributions.
The full conditional kernels areNeither is generally normal or another elementary conjugate family: the infection factors contain , and depends nonlinearly on . Thus a simple conjugate Gibbs sampler is unavailable. This does not make Gibbs sampling logically impossible; exact rejection or slice conditional draws could be used if implemented. A straightforward alternative is Metropolis–Hastings algorithm updates within each coordinate.
For example, put and use symmetric Gaussian random-walk proposals for . The target in these coordinates isThe factor is the Jacobian determinant and must be retained. Accept according to the ratio of this target, either for a block or one coordinate at a time. Posterior averages and quantiles of and estimate the requested marginal posterior distributions.
To compare kernels, introduce with positive model prior distribution probabilities . Under model two replace by , defining . The joint model/parameter target iswhere or and is its normalized proper prior distribution. Within each model use the preceding random-walk updates. For a concrete model switch, keep , propose the other model's kernel parameter independently from its prior distribution, and use equal forward and reverse switch-selection probabilities. A move from draws and has ratioAccept with the minimum of this ratio and one. The auxiliary-coordinate swap has absolute Jacobian determinant one, so no additional factor occurs; unequal switch-selection probabilities would require their reverse/forward ratio. This is a valid model-switching Markov chain Monte Carlo construction even though the two active models have equal parameter dimension. Prior distribution proposals may be inefficient, so fitted proposals can be substituted provided their probability densities remain in the acceptance ratio.
After checking mixing, estimate posterior model probabilities by the fractions of retained iterations in each model. The Bayes factor in favor of the first kernel isUse the posterior distributions within each model as well as these odds to assess the competing distance kernels. Proper prior distributions and their model-dependent normalizing constants are essential for this comparison.
Articles by others on the same topic
There are currently no matching articles.