Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › Worked Current-Value Association Calculations

Association Structures · Tutorial 181 of 697

Worked Current-Value Association Calculations

Calculate time-specific hazard ratios for marker-level contrasts from a fitted current-value predictor, and check that the comparison and its interpretation match the model.

Advanced 11 min read

What You'll Learn

  • Calculate a hazard ratio from a fitted current-value coefficient and a marker-level difference.
  • Compare several marker levels with a specified reference while holding baseline covariates fixed.
  • Use fitted marker values at different times to form time-specific comparisons.
  • Distinguish a same-time current-value contrast from a comparison across different times.
  • Check the sign, units, reference value, and interpretation of a calculated hazard ratio.

From a Fitted Predictor to a Hazard Ratio

A fitted joint model can summarize the association between a subject’s latent marker value and their event hazard. Turning that fitted association into a numerical hazard ratio requires care: the marker contrast must be clear, baseline covariates must be held fixed when isolating the marker association, and the hazards being compared must refer to the same time. This tutorial works through those calculations for several marker levels and times.

Write the current-value hazard model as

$$ h_i(t)=h_0(t)\exp\left\{\boldsymbol{\gamma}^{\mathsf T}\mathbf{w}_i+\alpha m_i(t)\right\}. $$

Here \(h_i(t)\) is subject \(i\)’s instantaneous event hazard at time \(t\), \(h_0(t)\) is the baseline hazard, \(\mathbf{w}_i\) is the vector of baseline covariates, \(\boldsymbol{\gamma}\) is its coefficient vector, \(m_i(t)\) is the latent marker value at time \(t\), and \(\alpha\) is the fitted current-value association parameter. In a calculation, fitted quantities will be marked with hats, such as \(\hat{\alpha}\) and \(\hat{m}_i(t)\).

Definition: At a fixed time \(t\), the current-value hazard ratio for marker value \(m_A\) versus marker value \(m_R\), with baseline covariates held fixed, is the hazard at \(m_A\) divided by the hazard at \(m_R\). Under the model above, it is \(\exp\{\alpha(m_A-m_R)\}\). The ratio compares instantaneous hazards, not event probabilities.

The reference value \(m_R\) matters for describing the comparison, although the hazard ratio depends on the difference \(m_A-m_R\). A ratio above 1 means the modeled hazard is higher at \(m_A\) than at \(m_R\); a ratio below 1 means it is lower. Neither statement alone establishes a causal effect.

Why the Baseline Terms Cancel

At a particular time, compare two marker values while keeping the covariate vector \(\mathbf{w}\) fixed. The fitted hazard at value \(m_A\) is \(h_0(t)\exp\{\boldsymbol{\gamma}^{\mathsf T}\mathbf{w}+\alpha m_A\}\); at value \(m_R\), it is \(h_0(t)\exp\{\boldsymbol{\gamma}^{\mathsf T}\mathbf{w}+\alpha m_R\}\). Their ratio is

$$ \frac{h(t\mid \mathbf{w},m_A)}{h(t\mid \mathbf{w},m_R)} = \frac{h_0(t)\exp\{\boldsymbol{\gamma}^{\mathsf T}\mathbf{w}+\alpha m_A\}} {h_0(t)\exp\{\boldsymbol{\gamma}^{\mathsf T}\mathbf{w}+\alpha m_R\}} = \exp\{\alpha(m_A-m_R)\}. $$

The baseline hazard cancels because both hazards are evaluated at the same time. The baseline-covariate contribution cancels because the covariates are held fixed. Thus, for this model, the marker contrast is calculated using the fitted association parameter and the difference in marker values; the values of the fixed baseline covariates do not alter that contrast.

More generally, if the fitted log-hazard predictor excluding the baseline hazard is \(\hat\eta(t)=\hat{\boldsymbol{\gamma}}^{\mathsf T}\mathbf{w}+\hat{\alpha}m(t)\), subtract the predictor at the reference marker value from the predictor at the comparison value, then exponentiate:

$$ \widehat{\mathrm{HR}}(t;m_A,m_R) = \exp\{\hat\eta(t;m_A)-\hat\eta(t;m_R)\} = \exp\{\hat{\alpha}(m_A-m_R)\}. $$

This is a plug-in calculation: it uses the estimated coefficient and marker values as if they were fixed at their fitted values. The numerical ratio does not by itself describe the uncertainty in the estimate; that requires uncertainty information from the fitted model.

Worked Calculations

Worked Example: Several Marker Levels at One Time

Suppose a hypothetical joint-model fit gives \(\hat{\alpha}=0.22\) per mg/L. At month 6, compare marker values of 3, 5, and 7 mg/L with a reference value of 3 mg/L. Keep the same baseline covariates for every comparison.

For 5 versus 3 mg/L, the marker difference is \(5-3=2\) mg/L. The fitted log-hazard contrast is \(0.22(2)=0.44\), so

$$ \widehat{\mathrm{HR}}(6;5,3)=\exp\{0.22(5-3)\} =\exp(0.44)=1.55. $$

For 7 versus 3 mg/L, the difference is \(7-3=4\) mg/L:

$$ \widehat{\mathrm{HR}}(6;7,3)=\exp\{0.22(7-3)\} =\exp(0.88)=2.41. $$

The resulting comparisons are:

Marker valueDifference from 3 mg/LCalculationFitted hazard ratio
3 mg/L0 mg/L\(\exp\{0.22(0)\}\)1.00
5 mg/L2 mg/L\(\exp\{0.22(2)\}\)1.55
7 mg/L4 mg/L\(\exp\{0.22(4)\}\)2.41

At month 6, conditional on the same baseline covariates and the fitted model, the hazard at 5 mg/L is estimated to be 1.55 times the hazard at 3 mg/L. The hazard at 7 mg/L is estimated to be 2.41 times the hazard at 3 mg/L. These are instantaneous hazard comparisons, not statements that the event probability is 55% or 141% higher.

Worked Example: Comparing Fitted Marker Values at Different Times

Suppose a hypothetical fitted trajectory, measured in mg/L, is \(\hat{m}(t)=4.0+0.60t\), where \(t\) is measured in years. Let \(\hat{\alpha}=0.15\) per mg/L. At each time, compare the fitted marker value with a marker value of 4.0 mg/L at that same time, holding baseline covariates fixed.

At \(t=1\) year, the fitted marker value is

$$ \hat{m}(1)=4.0+0.60(1)=4.60\text{ mg/L}. $$

The difference from the reference is \(4.60-4.00=0.60\) mg/L. Therefore,

$$ \widehat{\mathrm{HR}}(1;4.60,4.00) = \exp\{0.15(4.60-4.00)\} = \exp(0.090)=1.09. $$

At \(t=3\) years, the fitted value is \(4.0+0.60(3)=5.80\) mg/L. The difference from the same reference value is 1.80 mg/L, giving

$$ \widehat{\mathrm{HR}}(3;5.80,4.00) = \exp\{0.15(5.80-4.00)\} = \exp(0.270)=1.31. $$

The two ratios compare different marker contrasts at their respective times: 0.60 mg/L at year 1 and 1.80 mg/L at year 3. The larger ratio at year 3 follows from the larger marker difference, not from a changed association coefficient. Each comparison is made at one time against a marker reference at that same time, so the baseline hazard cancels within each ratio. These calculations do not compare the hazard at year 1 directly with the hazard at year 3.

Worked Example: Keeping a Baseline Covariate Fixed

Suppose a hypothetical fitted predictor is

$$ \hat{\eta}(t)= -0.10+0.03a+0.40q-0.08m(t), $$

where \(a\) is age in decades, \(q\) is a baseline treatment indicator coded 0 or 1, and \(m(t)\) is measured in marker units. For a subject with \(a=6\) decades and \(q=1\), compare marker values of 8 and 5 units at the same time.

The fixed baseline contribution is \(-0.10+0.03(6)+0.40(1)=0.48\). At 8 marker units, the predictor is \(0.48-0.08(8)=-0.16\). At 5 units, it is \(0.48-0.08(5)=0.08\). The predictor difference is \(-0.16-0.08=-0.24\), so

$$ \widehat{\mathrm{HR}}(8,5) = \exp\{(-0.16)-(0.08)\} = \exp(-0.24)=0.787. $$

Equivalently, the coefficient form gives \(\exp\{-0.08(8-5)\}=\exp(-0.24)=0.787\). With these baseline covariates fixed, the fitted hazard at 8 marker units is 0.787 times the fitted hazard at 5 units, or about 21.3% lower. The negative coefficient makes a higher marker value correspond to a lower modeled hazard in this contrast.

If the treatment indicator were also changed from 0 to 1, the contrast would no longer isolate the marker association. For example, changing from \(q=0,m=5\) to \(q=1,m=8\) gives predictor difference \(0.40-0.08(3)=0.16\), hence a ratio of \(\exp(0.16)=1.17\). That ratio combines a treatment contrast with a marker contrast.

Assumptions, Checks, and Interpretation

The arithmetic is valid for the specified fitted model when its current-value term is linear on the log-hazard scale, the comparison uses the same time and the same baseline covariates, and the marker values are expressed on the scale used to estimate \(\hat{\alpha}\). The latent marker values should be the model-based values intended by the analysis, rather than noisy observed measurements substituted without justification. These calculations interpret a fitted association; they do not establish that changing a marker would cause a change in hazard.

Before reporting a result, check the following:

  • Direction: calculate \(m_A-m_R\) in the stated order. A positive \(\hat{\alpha}\) gives a ratio above 1 for a higher marker value; a negative \(\hat{\alpha}\) gives a ratio below 1.
  • Units: \(\hat{\alpha}\) is per one unit of the marker on the model’s scale. If the marker was rescaled or transformed in the fitted model, use that model scale and interpret the contrast accordingly.
  • Time: hazards at different times generally have different baseline-hazard factors. Do not cancel \(h_0(t)\) when comparing across times.
  • Other predictors: hold baseline covariates fixed for a marker-only contrast. If they change, their fitted contributions belong in the predictor difference.
  • Precision: the point estimate alone does not show how uncertain the fitted association is. Report an uncertainty interval when the inferential question requires one.

The main calculation alternatives are different ways of expressing the same fitted contrast. A one-unit hazard ratio is \(\exp(\hat{\alpha})\); a contrast of \(d\) marker units is \(\exp(\hat{\alpha}d)\); and subtracting two fitted predictors before exponentiating is useful when the predictor contains several terms. The latter approach makes it easier to verify whether covariates have truly been held fixed. None of these is a risk ratio or a difference in cumulative event probability.

A common mistake is to calculate \(\exp\{\hat{\alpha}m_A\}\) and call it the hazard ratio for \(m_A\) versus \(m_R\). This omits the reference marker contribution. The correct calculation is \(\exp\{\hat{\alpha}(m_A-m_R)\}\), or, more generally, the exponential of the full fitted predictor difference. Another mistake is to compare a marker value at one time with a value at another and cancel the baseline hazard; that cancellation is justified only for a same-time comparison.

Key takeaway: For a same-time current-value comparison with baseline covariates fixed, subtract the reference marker from the comparison marker, multiply by the fitted current-value coefficient, and exponentiate. State the marker units, time, reference value, and instantaneous-hazard interpretation.

Check Your Understanding

Use the stated fitted model and show the contrast before exponentiating. Solutions follow each question.

  1. A fitted current-value coefficient is \(0.10\) per marker unit. Calculate the hazard ratio for 9 versus 6 units at the same time, with baseline covariates fixed.
    Solution: The difference is \(9-6=3\). Thus \(\widehat{\mathrm{HR}}=\exp\{0.10(3)\}=\exp(0.30)=1.35\). The fitted hazard at 9 units is 1.35 times that at 6 units for this same-time comparison.
  2. A fitted coefficient is \(-0.20\) per marker unit. Calculate the ratio for 2 versus 5 units and interpret its direction.
    Solution: The difference is \(2-5=-3\), so \(\widehat{\mathrm{HR}}=\exp\{(-0.20)(-3)\}=\exp(0.60)=1.82\). The lower marker value of 2 units has the higher fitted hazard in this contrast; the ratio is for 2 versus 5, not 5 versus 2.
  3. A fitted coefficient is \(0.12\) per mg/L. A model-based trajectory gives 3.5 mg/L at year 2 and 4.5 mg/L at year 4. At each time, compare the fitted value with 3.0 mg/L at that same time. Calculate both ratios.
    Solution: At year 2, the difference is \(3.5-3.0=0.5\) mg/L, so \(\exp\{0.12(0.5)\}=\exp(0.060)=1.06\). At year 4, the difference is \(4.5-3.0=1.5\) mg/L, so \(\exp\{0.12(1.5)\}=\exp(0.180)=1.20\). Each is a same-time marker contrast; the ratios do not directly compare year 2 with year 4.
  4. In the model \(\hat{\eta}=0.5+0.3q+0.1m\), compare \(q=0,m=4\) with \(q=1,m=6\) at the same time. Is the result a marker-only contrast?
    Solution: The predictor changes from \(0.5+0.1(4)=0.90\) to \(0.5+0.3+0.1(6)=1.40\). The difference is \(0.50\), giving \(\exp(0.50)=1.65\). This is not a marker-only contrast: it combines a \(0.3\) change in the baseline-covariate contribution with a \(0.2\) marker contribution.
Clinical Biostats