Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › Inverse-Intensity Weighting For Informative Visits

Informative Observation Schedules · Tutorial 48 of 697

Inverse-Intensity Weighting For Informative Visits

Learn how inverse visit-intensity weights adjust visit-based summaries toward a population-average target, and when that adjustment is justified.

Advanced 12 min read

What You'll Learn

  • Define inverse-intensity weights from a modeled visit rate
  • Derive the weighted estimating identity using a counting-process intensity
  • Distinguish a population person-time mean from a mean among observed visits
  • Calculate weighted summaries and interpret their target
  • Assess positivity, model fit, and practical limitations of the weights

Why Weight Visits by Their Rate?

When visits are more likely at some times or for some patients than others, a simple average of measurements taken at visits generally describes the visit records, not the population or risk set of interest. For example, if patients with high biomarker values tend to be seen more often, they contribute more measurements to the visit-level average. Inverse-intensity weighting corrects this overrepresentation by giving less weight to measurements collected under a high visit rate and more weight to measurements collected under a low visit rate.

The adjustment is not automatic protection against informative observation. Its validity depends on what the visit-rate model conditions on, whether the rate is positive, and whether the resulting weights target the desired summary. The aim here is a population-average longitudinal summary, not a causal effect.

Definition: Let \(N_i(t)\) count the visits for subject \(i\) by time \(t\), and let \(\lambda_i(t\mid\mathcal{F}_i(t-))\) be the conditional visit intensity given the history \(\mathcal{F}_i(t-)\) immediately before \(t\). At a visit time \(t\), the inverse-intensity weight is $$ w_i(t)=\frac{1}{\lambda_i(t\mid\mathcal{F}_i(t-))}. $$ The intensity is an instantaneous visit rate, with units of visits per unit time; the weight consequently has units of time. A constant multiplier applied to every weight cancels in a ratio estimator.

The Target and the Weighting Identity

Write \(Y_i(t)\) for the longitudinal outcome and \(R_i(t)\) for an indicator that subject \(i\) is in the target risk set at time \(t\). For example, \(R_i(t)=1\) while the subject is under observation and event-free, if the scientific target is the mean among event-free subjects. A corresponding time-specific risk-set mean is

$$ \mu_R(t)=\frac{E\{R_i(t)Y_i(t)\}}{E\{R_i(t)\}}, $$

provided \(E\{R_i(t)\}>0\). If the target is the full cohort at times when all subjects remain eligible, take \(R_i(t)=1\). The risk-set definition matters: weighting visits cannot define an outcome after a terminal event when that outcome is not defined.

The central identity follows from the compensator property of a counting process. Under the assumptions below, the visit-count process has compensator \(\int_0^t\lambda_i(s\mid\mathcal{F}_i(s-))\,ds\). Thus, for a suitable predictable quantity \(H_i(t)\), the expected integral against visits equals the expected integral against the intensity. Taking \(H_i(t)=R_i(t)Y_i(t)/\lambda_i(t)\) removes the visit rate from the expectation.

$$ E\left\{\int_a^b \frac{R_i(t)Y_i(t)}{\lambda_i(t)}\,dN_i(t)\right\} = E\left\{\int_a^b R_i(t)Y_i(t)\,dt\right\}. $$

The same argument with \(H_i(t)=R_i(t)/\lambda_i(t)\) gives

$$ E\left\{\int_a^b \frac{R_i(t)}{\lambda_i(t)}\,dN_i(t)\right\} = E\left\{\int_a^b R_i(t)\,dt\right\}. $$

Consequently, a ratio of weighted visit totals targets a risk-set person-time average over \([a,b]\):

$$ \mu_{R,[a,b]} = \frac{E\{\int_a^b R_i(t)Y_i(t)\,dt\}} {E\{\int_a^b R_i(t)\,dt\}}. $$

This is a time average over eligible person-time, not necessarily the mean at a particular instant. For a time-specific estimate, use a sufficiently local time window or a kernel around the time of interest; the resulting estimate smooths over time, so its bandwidth affects bias and variability.

Assumptions for the identity: The modeled \(\lambda_i(t)\) must be the correct conditional intensity for the visit process given the history required to make the visit process conditionally well described. The outcome and risk-set indicator used in the estimating equation must be predictable for that intensity formulation (or handled with an appropriate marked-process formulation). The intensity must be positive wherever the target person-time occurs, and the weighted integrals must be finite. In practice, identification also requires that the visit-rate model account for the relevant dependence between visiting and the unobserved outcome; modeling only recorded history is not sufficient if residual dependence on unobserved current outcome remains.

A Short Derivation of the Estimator

For \(n\) independent subjects, replace the expectations in the person-time identity by sums over subjects. If the intensity is known, the ratio

$$ \widehat{\mu}_{R,[a,b]} = \frac{\displaystyle\sum_{i=1}^n\int_a^b \frac{R_i(t)Y_i(t)}{\lambda_i(t)}\,dN_i(t)} {\displaystyle\sum_{i=1}^n\int_a^b \frac{R_i(t)}{\lambda_i(t)}\,dN_i(t)} $$

is a natural estimator of the person-time mean. To see the target, apply the compensator identity separately to numerator and denominator. Their expectations are \(nE\{\int_a^b R_i(t)Y_i(t)\,dt\}\) and \(nE\{\int_a^b R_i(t)\,dt\}\), respectively. Their ratio is \(\mu_{R,[a,b]}\). A finite-sample ratio is not generally exactly unbiased, but under regularity conditions it converges to this ratio as the number of subjects grows.

In practice, \(\lambda_i(t)\) is replaced by a fitted intensity \(\widehat{\lambda}_i(t)\). The resulting estimator also depends on how well the intensity model is estimated. Uncertainty calculations should account for repeated visits within subjects and estimation of the visit-rate model; treating all visit records as independent typically understates uncertainty.

Worked Example: Correcting Unequal Visit Rates

Consider a hypothetical one-year follow-up with two equally sized patient groups. Assume all 100 patients in each group remain in the target risk set for the full year. The first group has outcome \(Y=2\) and visit intensity \(0.5\) visits per year; the second has outcome \(Y=8\) and intensity \(2\) visits per year. Suppose the observed visit counts equal their expected counts: 50 visits in the first group and 200 in the second.

The unweighted mean across visits is

$$ \frac{50(2)+200(8)}{50+200} = \frac{1700}{250} = 6.8. $$

This is the mean among the visit records, which overrepresents the high-rate group. The inverse-intensity weights are \(1/0.5=2\) years per visit and \(1/2=0.5\) years per visit. The weighted ratio is

$$ \frac{50(2)(2)+200(8)(0.5)} {50(2)+200(0.5)} = \frac{200+800}{100+100} = 5. $$

The target person-time mean is also \(\{100(2)+100(8)\}/200=5\). Under the stated assumptions, weighting corrects the overrepresentation caused by the different visit rates. The arithmetic illustrates the identity; it does not show that a rate model would be correctly specified in an actual data set.

Computing and Interpreting a Weighted Summary

A visit-level implementation evaluates the fitted intensity for each observed record at that record’s time, assigns \(1/\widehat{\lambda}_i(t)\), and uses the weights in a ratio. For example, pooling visits in a time window estimates a person-time average across that window, subject to the assumptions and any time-smoothing approximation. The next example carries out this calculation for individual records.

Worked Example: A Weighted Mean in a Time Window

Suppose four hypothetical visits fall in the same short time window. Their measured outcomes and fitted intensities are \(4\) and \(0.5\), \(6\) and \(0.5\), \(10\) and \(2\), and \(12\) and \(2\), respectively. Intensities are in visits per year, so the weights are \(2,2,0.5,0.5\) years per visit.

The inverse-intensity weighted mean is

$$ \frac{2(4)+2(6)+0.5(10)+0.5(12)} {2+2+0.5+0.5} = \frac{31}{5} = 6.2. $$

The ordinary mean of the four records is \(8\), but the weighted estimate is \(6.2\). Under a correct intensity model, adequate positivity, and the conditions for the weighting identity, the latter targets a person-time summary for the window rather than simply the mean of the four observed records. With only four visits, it is a calculation demonstration, not a reliable precision estimate.

Positivity, Diagnostics, and Failure Modes

Positivity requires that every part of the target risk set has a nonzero chance of being observed in the relevant time region. In continuous time, the corresponding requirement is \(\lambda_i(t)>0\) on target person-time. If a subgroup is almost never visited, its inverse-intensity weights can become enormous. A few records may then dominate the estimate, producing high variance and sensitivity to small changes in the fitted rate.

Useful checks include examining the distribution of fitted intensities and weights, identifying records with extreme weights, and checking whether the fitted rates reproduce observed visit frequencies across time and patient-history groups. Compare weighted and unweighted summaries across important recorded history variables. Such checks can reveal instability or poor fit, but cannot establish that unobserved visit triggers have been adequately modeled.

Weight truncation, such as replacing values above a chosen threshold by that threshold, can reduce variance, but it changes the estimator and can reintroduce bias. It should be reported and accompanied by sensitivity analyses using reasonable alternatives. A nearly zero fitted intensity is not repaired merely by labeling the resulting weight an outlier.

Worked Example: Recognizing a Positivity Problem

Suppose two hypothetical risk-set groups have estimated visit intensities \(1\) and \(0.02\) visits per year. Their inverse-intensity weights are \(1\) and \(50\) years per visit. If one visit from each group has outcomes \(3\) and \(9\), the weighted mean is

$$ \frac{1(3)+50(9)}{1+50} = \frac{453}{51} \approx 8.882. $$

The second record contributes \(450\) of the weighted numerator and 50 of the total weight. Thus the estimate is largely determined by one observation from a group with a very low fitted rate. The calculation does not prove the target mean is near \(8.882\); it signals that the estimate may be unstable and that the positivity and model assumptions need careful scrutiny. If that group is effectively never observed, the target mean is not identified from these visit records by inverse-intensity weighting alone.

How This Approach Differs From Alternatives

ApproachWhat it targets or assumesMain concern
Unweighted visit averageMean among recorded visitsOverrepresents people or times with higher visit rates
Inverse-intensity weightingRisk-set person-time mean under a correctly modeled visit intensity and positivityCan be unstable with small fitted intensities; depends on rate-model assumptions
Joint model for outcome and visitsA model-based outcome and visit-process distribution specified togetherRelies on the joint model and its distributional assumptions

Inverse-intensity weighting is attractive because its target can be stated through a transparent weighted estimating equation and need not require specifying a full outcome distribution. A joint model can represent dependence through shared latent structure, but answers depend on the joint model’s assumptions. Neither approach automatically resolves dependence on unobserved visit triggers. The choice should reflect the scientific target, available measurements, and defensibility of the assumptions.

Common Mistake and Practical Limits

  • Wrong reasoning: “Visits were more frequent for some patients, so weighting each measurement by the inverse of its observed frequency guarantees an unbiased population mean.”
  • Correction: The intensity must be correctly modeled conditional on the relevant history, positive on the target person-time, and compatible with the outcome used in the estimating equation. Unmeasured factors that affect both the outcome and visit timing can invalidate the adjustment.
  • Wrong target: Calling a pooled, weighted estimate a mean at a single time when it was calculated across a wide time interval.
  • Correction: State whether the estimate is a time-window person-time average or a smoothed time-specific mean, and describe the window or smoothing choice.

The weights also do not correct terminal-event selection by themselves. If the target is the mean among those still event-free, define that risk set explicitly. If the desired target concerns outcomes after a terminal event, the outcome and estimand require a separate scientific definition. In addition, weighting cannot recover information from regions with no observations, and misspecified visit-rate models can produce biased estimates even when the computed weights look numerically well behaved.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. If a fitted visit intensity is \(0.25\) visits per month, what is the inverse-intensity weight, with units?
  2. In one time window, two visits have outcomes \(2\) and \(10\), with intensities \(1\) and \(0.5\) visits per year. Calculate the inverse-intensity weighted mean.
  3. Why can a very small fitted intensity make an estimate unreliable even if the weighted formula is computed correctly?
  4. What target does a pooled weighted ratio over a time interval generally estimate?

Solutions. (1) The weight is \(1/0.25=4\) months per visit. (2) The weights are \(1\) and \(2\) years per visit, so the weighted mean is \(\{1(2)+2(10)\}/(1+2)=22/3\approx7.333\). (3) Its reciprocal is very large, so a small number of records can dominate; this reflects weak positivity and often high variance. (4) Under the stated assumptions, it estimates a risk-set person-time average over that interval, not necessarily the mean at one instant.

Clinical Biostats