Why Update the Association Parameter Separately?
In a shared-random-effects joint model, the association parameter controls how the longitudinal trajectory enters the event hazard. Its posterior uncertainty matters because different values imply different strengths, and potentially different directions, of the link between the biomarker process and event risk. A Metropolis–Hastings (MH) update provides a general way to sample this parameter when its conditional posterior does not have a convenient standard distribution.
The update is conditional: at this step, the observed data and all other model parameters are held fixed. In particular, the current subject-specific random effects determine the longitudinal trajectories used in the survival likelihood. This is the same conditioning principle used for the subject-specific random-effect update, but the parameter being proposed—and therefore the terms that change in the posterior ratio—is different.
The update assumes the specified joint model and prior define a proper conditional posterior for the values being sampled. The proposal must also be defined on the parameter's support. For the ordinary random-walk example below, \(\alpha\) ranges over the real line. A parameter restricted to positive values needs a proposal that respects that restriction or a transformation that maps the real line to its support.
Constructing the Conditional Posterior Ratio
Write the joint posterior density as a product of its prior and likelihood contributions. When \(\psi\) is fixed, any factor that does not depend on \(\alpha\) cancels from the ratio of conditional posterior densities. In the shared-value model above, the longitudinal likelihood ordinarily has no direct \(\alpha\) term once the trajectory is held fixed; the association parameter enters through the survival likelihood and its prior. Thus an unnormalized conditional target can be written as
where \(L_{S,i}\) is subject \(i\)'s survival-likelihood contribution under the current values of the other parameters. If the prior for \(\alpha\) is independent of \(\psi\), then \(p(\alpha\mid\psi)=p(\alpha)\). If the model's prior structure makes it conditional on other parameters, that conditional prior—not an assumed independent prior—belongs in the target.
Suppose the current value is \(\alpha\), and a candidate \(\alpha^*\) is drawn from proposal density \(q(\alpha^*\mid\alpha)\). The acceptance probability is
If the candidate is accepted, the new value is \(\alpha^*\); otherwise, the chain stays at \(\alpha\). The proposal correction is essential unless the proposal is symmetric, meaning \(q(\alpha^*\mid\alpha)=q(\alpha\mid\alpha^*)\). For a symmetric proposal, including a normal random walk, the proposal densities cancel.
It is usually safer to compute the log of the ratio. Define
Then \(A=\min\{1,\exp(r)\}\). If \(r\geq 0\), accept with probability 1; if \(r<0\), accept with probability \(\exp(r)\). This formulation uses unnormalized posterior densities, so the conditional posterior's normalizing constant is not needed.
Worked Updates
Worked Example: A Symmetric Random-Walk Update
Consider a fully hypothetical conditional update with one subject whose trajectory is constant at \(m_i(t)=1\). Suppose the integrated baseline-risk exposure, with the other survival parameters held fixed, is \(0.4\), and the subject has an event. The association-dependent survival likelihood is therefore proportional to \(L_S(\alpha)=\exp\{\alpha-0.4\exp(\alpha)\}\). Use the prior \(\alpha\sim N(0,1)\), start at \(\alpha=0\), and propose \(\alpha^*=1\) from a symmetric normal random walk.
The log prior difference is \(-\tfrac12(1^2-0^2)=-0.5\). The log survival-likelihood difference is
The proposal correction is zero on the log scale because the normal random walk is symmetric. Hence \(r=0.3127-0.5=-0.1873\), and the acceptance probability is \(A=\exp(-0.1873)=0.8292\). The candidate is accepted with probability about \(82.9\%\); an actual update accepts it only if the generated uniform random number is below that probability.
The posterior ratio favors the current value slightly in this calculation, but the candidate is still accepted often. The calculation uses the survival likelihood and prior only because the other conditional-posterior terms are constant in \(\alpha\) and cancel.
Worked Example: Updating a Positive Parameter on the Log Scale
Suppose, hypothetically, that the association parameter is constrained to be positive and its conditional density on that scale is proportional to \(\pi(\alpha\mid\psi,D)\propto\alpha e^{-\alpha}\), for \(\alpha>0\). The current value is \(\alpha=1\). Propose on the log scale: let \(\eta=\log\alpha\), and use a symmetric random walk for \(\eta\) that happens to propose \(\eta^*=\log(1.5)\), corresponding to \(\alpha^*=1.5\).
A symmetric proposal in \(\eta\) targets the density of \(\eta\), not the density of \(\alpha\) without adjustment. Since \(\alpha=e^\eta\), the transformed target is \(\pi_\eta(\eta\mid\psi,D)=\pi_\alpha(e^\eta\mid\psi,D)e^\eta\). The factor \(e^\eta=\alpha\) is the Jacobian. The log acceptance ratio is therefore
Using the stated target, the density ratio is \((1.5e^{-1.5})/(1e^{-1})=1.5e^{-0.5}\). After including the Jacobian ratio \(1.5\), the transformed-target ratio is \(1.5^2e^{-0.5}=1.3647\). Thus \(A=\min(1,1.3647)=1\): this candidate is accepted. Omitting the Jacobian would instead give a ratio of about \(0.9098\), which targets the wrong distribution for this transformed update.
Worked Example: Comparing Candidate Moves at Different Scales
Return to the first example's conditional target and current value \(\alpha=0\). For a symmetric normal random walk, compare four possible positive candidate increments, \(0.1,\ 0.5,\ 1,\) and \(2\). These are illustrative proposed values, not expected acceptance rates. The log ratio for a candidate \(a\) is
The first two terms are the survival log-likelihood difference; the last term is the normal-prior log-density difference. Substitution gives:
- For \(a=0.1\), \(r=0.1-0.4(e^{0.1}-1)-0.005=0.0529\), so \(A=1\).
- For \(a=0.5\), \(r=0.5-0.4(e^{0.5}-1)-0.125=0.1155\), so \(A=1\).
- For \(a=1\), \(r=1-0.4(e-1)-0.5=-0.1873\), so \(A=0.8292\).
- For \(a=2\), \(r=2-0.4(e^2-1)-2=-2.556\), so \(A=0.0777\).
The larger proposed move is much less likely to be accepted in this particular calculation. But this comparison alone does not establish which proposal scale will produce the best chain: smaller moves can be accepted frequently while exploring the posterior slowly, and a single proposed value is not an average acceptance rate.
Why the Update Has the Desired Target
The MH acceptance rule balances the probability of proposing a move in each direction against the target density at its endpoints. For two distinct states \(x\) and \(y\), let the target density be \(\pi\), and set \(A(x,y)=\min\{1,\pi(y)q(x\mid y)/[\pi(x)q(y\mid x)]\}\). The probability flow from \(x\) to \(y\), weighted by the target, is
The right-hand side is unchanged when \(x\) and \(y\) are exchanged. Thus the flow from \(x\) to \(y\) equals the flow from \(y\) to \(x\), which is detailed balance. Rejected proposals contribute probability of staying at the current state; they do not break this equality. Consequently the target density is invariant under the MH transition. For the chain to explore the full target in the long run, the proposal must also allow access to the relevant parts of the target, and standard convergence conditions such as irreducibility and aperiodicity are needed.
This argument justifies the acceptance rule, not a particular choice of proposal scale. The conditional target still needs to be correctly specified, and a chain that rarely moves or explores only part of that target can give poor posterior summaries despite using a valid MH formula.
Scale, Diagnostics, and Alternatives
For a random-walk proposal \(\alpha^*=\alpha+\epsilon\), with \(\epsilon\) drawn from a centered normal distribution with standard deviation \(s_q\), changing \(s_q\) changes how far candidates tend to lie from the current value. If \(s_q\) is very small relative to the posterior's spread, acceptance can be high but successive draws may be strongly dependent. If it is too large, candidates may often land in low-density regions and be rejected, leaving long runs at the same value. The useful scale depends on the conditional posterior's location, spread, and shape; there is no universal acceptance rate that guarantees good performance.
Assess the chain using several pieces of evidence rather than acceptance alone. Check that the trace moves through the plausible posterior range without persistent sticking or unexplained jumps; compare chains started at dispersed plausible values; and examine autocorrelation and effective sample size for \(\alpha\). Also verify the computed log target at representative values, check that the prior and likelihood use the same parameterization, and inspect numerical calculations such as the trajectory evaluation or survival-hazard integral. If exponentials become extremely large or small, log-scale calculations can prevent overflow and underflow.
A random-walk MH update is convenient when the conditional posterior has no direct sampler and a local proposal is reasonable. If a full conditional distribution can be sampled exactly, a Gibbs update avoids a rejection step. An independence MH proposal draws candidates without centering them on the current value; it can work when its distribution covers the target well, but poor overlap can lead to frequent rejection. A transformed random walk can respect a constrained support, provided its target density includes the appropriate Jacobian. These are alternatives in proposal or update design, not reasons to omit the conditional posterior calculation.
A common mistake is to calculate only the likelihood ratio and then accept every candidate with a higher likelihood. The posterior target includes the prior as well, and an asymmetric proposal also requires its reverse-to-forward proposal-density ratio. Another mistake is to treat a high acceptance rate as proof of good mixing. High acceptance can accompany extremely small moves, so posterior summaries should be checked for dependence and adequate exploration.
Check Your Understanding
Work through the questions, then compare your reasoning with the solutions.
- For a symmetric proposal, the conditional posterior ratio for a candidate is \(0.7\). What is its acceptance probability?
- A proposal has target-density ratio \(0.4\), forward proposal density \(q(\alpha^*\mid\alpha)=0.2\), and reverse proposal density \(q(\alpha\mid\alpha^*)=0.5\). Calculate the acceptance probability.
- Why must a random walk on \(\eta=\log\alpha\) include a Jacobian when the intended target is a density for positive \(\alpha\)?
- A chain's association-parameter updates are accepted 95% of the time, but its trace barely changes. Give a plausible explanation and one additional diagnostic.
Solutions. (1) The proposal correction is 1, so \(A=\min(1,0.7)=0.7\). (2) The full ratio is \(0.4(0.5/0.2)=1\), hence \(A=1\). (3) The change of variables has \(d\alpha/d\eta=e^\eta=\alpha\); multiplying the density by this Jacobian makes the transformed target represent the same probability distribution. (4) The proposal scale may be too small, producing frequent but tiny accepted moves. Inspect autocorrelation or effective sample size, as well as the trace, to assess how much independent posterior information the chain provides.