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.
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
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.
The same argument with \(H_i(t)=R_i(t)/\lambda_i(t)\) gives
Consequently, a ratio of weighted visit totals targets a risk-set person-time average over \([a,b]\):
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.
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
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
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
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
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
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
| Approach | What it targets or assumes | Main concern |
|---|---|---|
| Unweighted visit average | Mean among recorded visits | Overrepresents people or times with higher visit rates |
| Inverse-intensity weighting | Risk-set person-time mean under a correctly modeled visit intensity and positivity | Can be unstable with small fitted intensities; depends on rate-model assumptions |
| Joint model for outcome and visits | A model-based outcome and visit-process distribution specified together | Relies 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.
- If a fitted visit intensity is \(0.25\) visits per month, what is the inverse-intensity weight, with units?
- 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.
- Why can a very small fitted intensity make an estimate unreliable even if the weighted formula is computed correctly?
- 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.