Why quantify uncertainty in an individual’s hazard?
A shared-random-effects joint model connects a subject’s longitudinal trajectory with their event hazard through latent subject-specific effects. For a particular subject, the hazard at time \(t\) is therefore uncertain: the subject’s random effects are estimated rather than known, and the hazard parameters are uncertain as well. Reporting only a hazard calculated at estimated parameter values can conceal that uncertainty.
The target here is the posterior distribution of one subject’s hazard at one specified time, conditional on the observed joint-model data. It is not the distribution of hazards across a new population, and a hazard is not itself a probability of experiencing an event.
Define the subject-specific hazard at the chosen time
Let \(D\) denote the observed data used to fit the joint model, including the longitudinal measurements and event or censoring information. Write \(\theta\) for the model parameters, including longitudinal fixed effects, association parameters, and baseline-hazard parameters. Let \(b_i\) be the random effects for subject \(i\). One common current-value shared-random-effects specification is
Here \(m_i(t;\beta,b_i)\) is the modelled longitudinal value at time \(t\); \(h_0(t;\gamma)\) is the baseline hazard; and \(\eta\) and \(\alpha\) are regression and association parameters. The exponent is dimensionless, so the hazard has the same units as the baseline hazard, such as events per year. The formula is one standard shared-effects form; a model with another specified association structure must use that structure in the calculation.
This is a subject-specific, conditional hazard: at time \(t\), it describes the instantaneous event rate for subject \(i\), conditional on being event-free just before \(t\), given the subject’s latent effects and model parameters. Its posterior distribution reflects uncertainty about those quantities. It does not describe variability between hypothetical new subjects unless the target is explicitly changed to include new random effects drawn from their population distribution.
From posterior draws to a hazard distribution
Suppose there are \(M\) draws from the joint posterior, written \((\theta^{(s)},b_i^{(s)})\) for \(s=1,\ldots,M\). Evaluate the hazard for each draw using the same subject and the same specified time:
These values are posterior draws of the hazard. Their empirical mean estimates the posterior mean, their empirical quantiles estimate posterior quantiles, and the fraction above a threshold estimates a posterior exceedance probability. For example,
The computation is justified because the posterior mean is the integral of the hazard function over the joint posterior of the random effects and parameters. A posterior sample approximates that integral by averaging the function evaluated at its draws. Likewise, the posterior probability above \(c\) is the integral of the indicator \(I\{h_i(t)>c\}\), approximated by the proportion of draws for which the indicator is one. For dependent simulation draws, these summaries remain defined the same way; adequate effective sample size is needed for them to be estimated precisely.
A central 95% equal-tailed credible interval is formed from the 2.5th and 97.5th posterior quantiles of the hazard draws. Under the fitted model and conditional on \(D\), this interval contains 95% of the posterior probability for the hazard at that time. It is not a statement that a fixed parameter has a 95% frequentist probability of lying in the realized interval.
Worked Example: Calculating One Posterior Hazard Draw
Suppose time is measured in years and one posterior draw gives an exponential baseline hazard of \(\lambda^{(s)}=0.018\) events per year, an association parameter \(\alpha^{(s)}=0.7\) per unit of the longitudinal marker, and the subject’s modelled marker value at the chosen time of \(m_i(t)^{(s)}=1.2\) units. Assume there is no additional covariate term in this example, so \(h_i(t)=\lambda\exp\{\alpha m_i(t)\}\).
Substituting the draw-specific values gives
This is the hazard for this one draw, not a point estimate that accounts for all posterior uncertainty. Repeating the calculation for every paired posterior draw produces the hazard distribution to summarize.
Worked Example: A Posterior Mean, Credible Interval, and Exceedance Probability
For a hypothetical subject at a fixed time, suppose \(M=1000\) joint posterior draws produce hazards whose sum is \(38.2\) events per year. Using the empirical inverse-CDF quantile convention, suppose the 25th, 500th, and 975th ordered values are \(0.0148\), \(0.0351\), and \(0.0816\) events per year, respectively. Also suppose 240 of the 1000 draws exceed \(0.0500\) events per year.
The posterior mean estimate is
With this quantile convention, the 95% equal-tailed credible interval is approximately \([0.0148,0.0816]\) events per year. The estimated posterior probability that the hazard exceeds \(0.0500\) events per year is
Thus, conditional on the model and the observed data, the posterior probability that this subject’s hazard at the specified time exceeds \(0.0500\) events per year is estimated to be 24.0%. This is not the probability that the subject will experience an event in the coming year.
Why paired draws and the chosen time matter
Each hazard draw should use a coherent joint posterior draw: its baseline-hazard parameters, association parameter, fixed effects, and subject-specific random effects must come from the same draw. These quantities can be posterior dependent. Combining a random effect from one draw with an association parameter from another generally creates combinations that do not represent the fitted joint posterior, and can distort the uncertainty in the hazard.
The time \(t\) is part of the target, not just a label. In a random-intercept-and-slope model, uncertainty about the slope changes the estimated longitudinal value as time changes. Consequently, the hazard distribution at one time does not automatically describe the distribution at another time. The calculation should also use consistent time units: evaluating a baseline hazard expressed per year at a time recorded in months without conversion can produce a numerically plausible but incorrectly scaled result.
Worked Example: Random-Slope Uncertainty Changes the Hazard Over Time
Consider the hazard model \(h_i(t)=0.020\exp\{0.5m_i(t)\}\) events per year, with time in years and \(m_i(t)=b_{0i}+b_{1i}t\). For illustration, suppose two posterior draws for the subject’s random effects are \((b_{0i},b_{1i})=(0.4,0.2)\) and \((0.1,0.5)\), while the baseline and association parameters are the same in both draws.
At \(t=1\) year, the first draw gives \(m_i(1)=0.4+0.2(1)=0.6\); the second gives \(m_i(1)=0.1+0.5(1)=0.6\). Both therefore give
At \(t=3\) years, the longitudinal values are \(0.4+0.2(3)=1.0\) and \(0.1+0.5(3)=1.6\). The resulting hazards are
The two draws agree at one time but not another because their slopes differ. In a full analysis, many posterior draws would be evaluated at each chosen time to obtain that time’s posterior distribution. A pointwise interval at one time does not, by itself, provide a simultaneous interval for the entire hazard trajectory.
Interpretation, alternatives, and limitations
The earlier material on posterior summaries for biomarker-survival association concerns uncertainty in association parameters. Subject-specific hazard uncertainty uses the same posterior information but transforms the joint draws into a different target: a hazard value for a particular subject at a particular time. Because the hazard is a nonlinear function of the parameters and random effects, calculating it at posterior mean parameter values need not equal its posterior mean. For example, in general \(E[\exp(X)\mid D]\ne\exp(E[X\mid D])\).
| Approach | What it summarizes | Main caution |
|---|---|---|
| Draw-by-draw posterior hazards | Posterior uncertainty in the subject’s hazard at a chosen time | Requires coherent joint posterior draws and a correctly evaluated hazard formula |
| Hazard at posterior mean parameters | A hazard evaluated at a single set of averaged inputs | Does not generally equal the posterior mean hazard or describe its uncertainty |
| Frequentist estimate with a standard error or interval | Sampling uncertainty under a frequentist estimation procedure | Has a different inferential interpretation from a posterior distribution |
| Population-average hazard summaries | A target averaged over a population or distribution of random effects | Is not the same as the conditional hazard for this observed subject |
A posterior hazard interval can be wide or skewed, particularly when uncertainty in a random effect is amplified by the exponential link. It is conditional on the fitted model and available data; it does not account automatically for model misspecification or unrepresented sources of uncertainty. Posterior uncertainty also differs from Monte Carlo error: too few effectively independent draws can make the computed summaries imprecise even when the underlying posterior is well-defined.
Useful checks include confirming that every computed hazard is positive, checking that the specified time is in the model’s supported range, and verifying that the baseline-hazard units agree with the time scale. Inspect whether a few extreme draws dominate the mean, and compare summaries across well-mixed portions of the posterior simulation. If results are implausibly extreme, check exponent calculations, covariate units, and whether paired draws were retained. These checks diagnose computation or interpretation problems; they do not establish that the model itself is adequate.
A common mistake: treating hazard as risk
A hazard of \(0.040\) events per year is an instantaneous rate, not a 4% probability of an event in the next year. To obtain an event probability over an interval, one needs the hazard over that interval and the corresponding cumulative hazard. For a constant hazard \(h=0.040\) per year over one year, the event probability conditional on being event-free at the interval’s start is \(1-\exp(-0.040)\approx0.0392\), not exactly \(0.040\). If the hazard varies with time, the interval calculation must account for that variation. Therefore, do not label a posterior hazard interval as an interval for event probability.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- In a shared-random-effects model, which quantities should be used together to calculate a subject’s hazard for one posterior draw?
- A posterior mean hazard is \(0.030\) events per month. What does this quantity summarize, and what does it not directly give?
- At a fixed time, 75 of 500 posterior hazard draws exceed \(0.060\) events per year. Estimate the posterior exceedance probability.
- Why can the hazard evaluated at posterior mean parameters differ from the posterior mean hazard?
- What does a pointwise 95% credible interval for the hazard at time \(t\) say, and what does it not say about all times?
Solutions. 1. Use the parameters and that subject’s random effects from the same joint posterior draw, along with the subject’s covariates and the specified time. 2. It summarizes the posterior average of the instantaneous subject-specific hazard at the stated time, conditional on the data and model. It does not directly give the probability of an event in a month. 3. The estimate is \(75/500=0.150\), or 15.0%. 4. The hazard is a nonlinear function of its inputs, so in general the function evaluated at posterior means is not the posterior mean of the function. 5. Under the model and conditional on the observed data, it contains 95% of the posterior probability for the hazard at that particular time. It does not guarantee 95% coverage of the entire hazard trajectory simultaneously.