Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › Baseline Hazard Prior Sensitivity

Bayesian Joint Models · Tutorial 328 of 697

Baseline Hazard Prior Sensitivity

You will learn to design controlled baseline hazard prior comparisons and interpret their effects on association estimates and posterior event-risk summaries.

Advanced 12 min read

What You'll Learn

  • Distinguish changes to the baseline hazard representation from changes to prior concentration.
  • Set up controlled comparisons that hold the data model and other priors fixed.
  • Calculate posterior event-risk summaries from joint posterior draws.
  • Interpret changes in association estimates and uncertainty across baseline hazard priors.
  • Recognize warning signs and limitations in prior sensitivity analyses.

Why the Baseline Hazard Prior Matters

In a joint model, the baseline hazard describes how event risk changes over time before accounting for measured covariates and the shared longitudinal signal. Its prior can affect more than the estimated shape of the hazard: because baseline risk and the association parameter are estimated together, a different prior can also change posterior association estimates and predicted event risks. The practical question is not whether one prior is universally best, but whether conclusions of interest remain similar under defensible alternatives.

A useful sensitivity analysis separates two choices that are easy to conflate. Flexibility concerns how many or what kind of time patterns the baseline hazard can represent. Prior concentration concerns how strongly the prior favors particular values or smoothness within a chosen representation. Changing both at once makes it difficult to interpret a difference in posterior results.

Definition: Baseline hazard prior sensitivity is the change in posterior summaries of interest when the prior distribution for the baseline hazard, or its parameters, is replaced by a specified alternative while the observed data and the rest of the model are held fixed. A comparison of flexibility changes the hazard representation; a comparison of concentration changes the prior’s dispersion or smoothing strength within the same representation.

Model and Comparison Conditions

For a subject \(i\), let \(Y_{ij}\) be the longitudinal measurement at time \(t_{ij}\), and let \(m_i(t)\) be the subject-specific latent longitudinal trajectory, which may depend on shared random effects \(b_i\). A common shared-parameter event model has hazard

$$ h_i(t\mid b_i)=h_0(t)\exp\{x_i^\mathsf{T}\beta+\alpha m_i(t)\}. $$

Here \(h_0(t)\) is the baseline hazard, \(x_i\) is a vector of event-model covariates, \(\beta\) is their coefficient vector, and \(\alpha\) is the association parameter linking the latent trajectory to event risk. For example, when \(m_i(t)\) is a biomarker level, a positive \(\alpha\) means that a higher latent biomarker level is associated with a higher instantaneous event hazard, conditional on the other model terms.

A prior sensitivity comparison is meaningful only if the models are fitted to the same data with the same event and longitudinal likelihoods, the same covariate specifications, and the same priors for parameters other than the baseline hazard. Use the same time origin, follow-up interval, and definition of the target risk. The censoring mechanism must be appropriately handled; a standard survival likelihood assumes censoring is noninformative conditional on included variables and the model. Priors must be proper, or any impropriety must be shown not to invalidate the posterior. The assumed baseline hazard must be positive over follow-up.

One useful representation divides time into intervals and assigns a log hazard \(\gamma_j\) to interval \(j\), so \(h_0(t)=\exp(\gamma_j)\) there. A prior such as \(\gamma_1\sim N(\mu_0,s_0^2)\) and \(\gamma_j-\gamma_{j-1}\sim N(0,\sigma_\gamma^2)\) for later intervals makes the increment scale \(\sigma_\gamma\) a concentration choice: a smaller value favors more similar neighboring log hazards. A different number or placement of intervals changes the representation and therefore its flexibility. Spline bases with smoothing priors provide another representation; the earlier material on Spline Baseline Hazards with Smoothing Priors covers that construction.

Posterior Event Risk Must Be Calculated Draw by Draw

For a fixed posterior draw and a specified subject trajectory, the cumulative hazard through time \(t\) is

$$ H_i(t)=\int_0^t h_0(u)\exp\{x_i^\mathsf{T}\beta+\alpha m_i(u)\}\,du, \qquad P(T_i\leq t\mid b_i,\text{parameters})=1-\exp\{-H_i(t)\}. $$

The posterior mean event risk is the posterior expectation of this risk, not generally the risk calculated from posterior mean parameters. With posterior draws indexed by \(s=1,\ldots,S\), calculate \(r_i^{(s)}(t)=1-\exp\{-H_i^{(s)}(t)\}\), then average the risks. To report a population-level prediction, specify whether random effects are held at a chosen value or integrated over their posterior or population distribution. Those are different estimands.

This draw-by-draw procedure is necessary because the exponential and integration operations are nonlinear. Averaging \(H_i^{(s)}(t)\), \(h_0^{(s)}\), or \(\alpha^{(s)}\) first and then transforming need not give the posterior mean risk. It can also conceal dependence among the baseline hazard, association parameter, and random effects within posterior draws.

Worked Example: Averaging Event Risk Across Posterior Draws

Suppose two equally weighted posterior draws are available for a hypothetical subject at time \(t=2\) years. For simplicity, each draw has a constant marker value \(m_i=0.5\) over this interval, and \(x_i^\mathsf{T}\beta=0\). The draws give \(H_0(2)=0.20,\ \alpha=0.40\) and \(H_0(2)=0.36,\ \alpha=0.80\), where \(H_0(2)\) is the baseline cumulative hazard.

With a constant marker, \(H_i(2)=H_0(2)\exp\{\alpha(0.5)\}\). For the first draw,

$$ H_i^{(1)}(2)=0.20\exp(0.40\times0.5) =0.20\exp(0.20)\approx0.2443, \qquad r_i^{(1)}(2)=1-\exp(-0.2443)\approx0.2167. $$

For the second draw,

$$ H_i^{(2)}(2)=0.36\exp(0.80\times0.5) =0.36\exp(0.40)\approx0.5371, \qquad r_i^{(2)}(2)=1-\exp(-0.5371)\approx0.4155. $$

The posterior mean risk from these equally weighted draws is \((0.2167+0.4155)/2\approx0.3161\), or 31.6% by time 2 years. This is the average of the two risks, not a risk computed from the mean of the two baseline cumulative hazards and the mean of the two association values.

Separate Concentration From Flexibility

A controlled comparison changes one prior feature at a time. For a concentration analysis, keep the interval structure fixed and compare, for example, two increment standard deviations \(\sigma_\gamma\). A smaller standard deviation places more prior mass on small neighboring log-hazard changes; a larger one allows more variation. For a flexibility analysis, compare different representations or resolutions, such as a coarser and finer interval partition, while calibrating the priors so they imply reasonably comparable baseline hazard variation over the study period. Calibration matters: assigning the same numerical prior scale to coefficients in different bases does not guarantee comparable prior behavior.

1
Choose estimands.
Specify association summaries, such as the posterior median and credible interval for \(\alpha\), and event-risk summaries at clinically or scientifically meaningful times.
2
Define a controlled alternative.
For concentration, keep the basis or intervals unchanged and alter a prior scale. For flexibility, alter the representation and deliberately assess whether the implied prior variation is comparable.
3
Fit and check each model.
Use the same likelihood and non-baseline priors. Check chain mixing and Monte Carlo error for the summaries being compared; a poorly estimated difference is not evidence of prior sensitivity.
4
Compare posterior consequences.
Report changes in location and uncertainty for \(\alpha\), and calculate event risks from each model’s posterior draws using the same target population and time horizon.

Worked Example: Changing Prior Concentration With the Representation Fixed

Consider a hypothetical analysis with the same six time intervals in both fits. The only change is the prior standard deviation for adjacent log-hazard increments: 0.15 in the more concentrated analysis and 0.60 in the less concentrated analysis. Suppose the resulting posterior summaries are as follows. The reported risks are posterior mean risks by 2 years for the same defined covariate profile and random-effects averaging rule in both fits.

Increment prior SDPosterior median of \(\alpha\)95% credible interval for \(\alpha\)Posterior mean 2-year risk
0.150.520.12 to 0.910.27
0.600.700.10 to 1.310.30

In this hypothetical output, the less concentrated baseline prior is accompanied by a higher posterior median association estimate and a wider credible interval. The posterior mean event risk is also higher by 0.03, or 3 percentage points, under the specified prediction rule. These are changes in posterior summaries, not proof that the baseline prior alone caused a scientifically meaningful difference; Monte Carlo error and the exact prior calibration should also be assessed. Because only the prior scale changed, this comparison addresses concentration rather than representation flexibility.

Worked Example: Comparing Baseline Hazard Flexibility

Now suppose two hypothetical fits use the same data and other priors, but one uses a coarse baseline representation and the other a finer representation. The priors have been calibrated to give broadly similar prior variation in cumulative baseline hazard over follow-up. Suppose posterior medians of \(\alpha\) are 0.62 and 0.58, respectively, with overlapping 95% credible intervals, and posterior mean 2-year risks are 0.28 and 0.30. These summaries suggest modest changes in these particular outputs, not identity of the fitted hazard curves.

For one illustrative draw from the finer fit, let the baseline cumulative hazard at 2 years be 0.25, \(\alpha=0.60\), and the constant marker value be 0.40, with no covariate contribution. Then

$$ H_i(2)=0.25\exp(0.60\times0.40) =0.25\exp(0.24)\approx0.3178, \qquad r_i(2)=1-\exp(-0.3178)\approx0.2723. $$

This single-draw risk is not the posterior mean risk of 0.30: the latter averages transformed risks over all posterior draws and, as specified, may also integrate over random effects. The comparison changes representation, so it assesses flexibility. If the prior calibrations had been very different, the observed change could reflect both flexibility and concentration, weakening the interpretation.

Reading the Results and Recognizing Failure Modes

Baseline hazard prior sensitivity matters when the scientific conclusion relies on an association estimate or an absolute event-risk prediction. An association estimate may remain similar while predicted risks change, or the reverse; report both if both inform the analysis. For example, a relative association can be fairly stable even as the baseline hazard’s time pattern changes the absolute risk at a particular horizon.

For each fit, examine posterior baseline hazard or cumulative hazard summaries over time, not only \(\alpha\). Check that the posterior does not pile up against an arbitrary boundary, that the hazard is not implausibly erratic relative to the intended prior, and that fitted predictions are supported by the observed event-time pattern. Assess chain diagnostics and Monte Carlo error for the posterior summaries and risk differences, using the earlier material on trace plots, effective sample size, and Monte Carlo error. If posterior chains have not adequately explored the target distribution, apparent prior sensitivity may instead be computational instability.

A common mistake is to say, “The more flexible hazard gave a different association, so flexibility caused the change,” after simultaneously changing the basis, smoothing scale, and prior on other parameters. That reasoning cannot isolate the source of the difference. The correction is to make controlled comparisons, calibrate prior implications across representations, and describe any remaining combined change honestly. A second pitfall is comparing conditional risk in one fit with population-averaged risk in another; the prediction target must be identical.

No sensitivity analysis proves that a chosen prior is correct. Results can depend on the follow-up range, sparse events, time partition, and how the prior is parameterized. A very rigid prior can underrepresent real time variation; a very permissive one can allow unstable hazards when event information is limited. Sensitivity summaries also do not replace posterior predictive checks or checks of computational convergence. Present a small set of scientifically defensible alternatives and explain the implications, rather than searching for a prior that produces a preferred association estimate.

ComparisonWhat changesInterpretation
Prior concentrationPrior dispersion or smoothing strength within a fixed representationHow strongly the prior regularizes that representation
Hazard flexibilityBasis, number of intervals, or other representation choiceWhich time patterns can be represented, with results also depending on prior calibration
Uncontrolled joint changeRepresentation and prior scale change togetherCan reveal sensitivity to the combined specification, but cannot attribute it to one feature
Key takeaway: Compare baseline hazard priors by holding the rest of the joint model fixed, separating concentration from flexibility, and calculating each event-risk summary from that model’s posterior draws. Interpret changes in association and risk in light of prior calibration, computation, and the prediction target.

Check Your Understanding

Answer each question, then compare with the brief solutions.

  1. With an interval log-hazard model held fixed, what does decreasing the standard deviation of adjacent log-hazard increments generally do?
  2. Why should posterior event risk be calculated for each posterior draw before averaging?
  3. In a hypothetical fit, the posterior mean 2-year risk is 0.24 under one baseline prior and 0.29 under another. State the difference in context without claiming a causal effect.
  4. A comparison changes both the number of baseline intervals and the smoothing prior scale. What can and cannot be concluded?
  5. For a single draw, \(H_0(1)=0.10\), \(\alpha=0.50\), and \(m_i(t)=1\) over one time unit, with no covariate contribution. Calculate the event risk by time 1.

Solutions. (1) It concentrates the increment prior more strongly near zero, favoring more similar neighboring log hazards. (2) Because the risk transformation is nonlinear and posterior parameters can be dependent; the mean of draw-specific risks is the posterior mean risk. (3) The second fit has a posterior mean 2-year risk 0.05 higher, or 5 percentage points, for the stated prediction target. This is a difference between posterior summaries, not evidence that choosing that prior causally changes risk. (4) The comparison can describe sensitivity to the combined specification, but cannot attribute the difference to flexibility or concentration alone. (5) The cumulative hazard is \(0.10\exp(0.50)\approx0.1649\), so the risk is \(1-\exp(-0.1649)\approx0.1520\), or 15.2%.

Clinical Biostats