Tutorials › Generalized Linear Models › Worked Problems In Exposure And Rate Modeling

Exposure and Rate Modeling · Tutorial 448 of 981

Worked Problems In Exposure And Rate Modeling

Work through unequal follow-up, population denominators, rate ratios, and standardized rates, with uncertainty calculations matched to each estimand.

Intermediate 10 min read

What You'll Learn

  • Distinguish person-time exposure from a population denominator and identify the rate each supports
  • Combine independent Poisson counts with unequal fixed exposures to estimate a common rate
  • Calculate and interpret a rate ratio and its approximate confidence interval
  • Define a directly standardized rate using fixed standard-population weights
  • Derive uncertainty for standardized rates and their difference
  • Check variance calculations and recognize when a Wald interval is only an approximation

Choosing the Estimand Before Calculating

Exposure-and-rate problems often contain several denominators, multiple strata, and more than one plausible comparison. The first task is to decide what quantity the question asks for. A crude rate describes events per unit of observed exposure; a rate ratio compares two rates; a directly standardized rate compares groups after applying the same stratum weights. These are different estimands, so they need not lead to the same numerical answer.

For a Poisson rate model, let \(Y_i\) be the event count for observation \(i\), and let \(E_i>0\) be its known exposure, such as person-years. With rate \(\lambda_i\), the model is \(Y_i\sim\operatorname{Poisson}(E_i\lambda_i)\). The exposure is part of the mean, not an ordinary predictor whose effect is estimated when the proportional-exposure assumption is imposed. Population size can serve as a denominator for a population rate, while person-time is appropriate when time at risk varies. The denominator must match the scientific question and the way events could accumulate.

Definition: Given event count \(D\) and positive exposure \(E\), the observed rate is \(\hat\lambda=D/E\). A rate ratio is the quotient of two rates, \(\hat\lambda_1/\hat\lambda_0\). Given stratum-specific rates \(\hat\lambda_{gj}\) for group \(g\) and fixed standard-population weights \(w_j\) satisfying \(w_j\geq0\) and \(\sum_jw_j=1\), the directly standardized rate is \(\hat\lambda_g^{\,std}=\sum_jw_j\hat\lambda_{gj}\).

Unequal Follow-Up and a Rate Ratio

Suppose independent counts \(Y_i\) have Poisson distributions with means \(E_i\lambda\), where the exposures \(E_i\) are fixed and the rate \(\lambda\) is common. The total count and total exposure, rather than an unweighted average of record-specific rates, determine the rate estimate.

Result: Under the common-rate model with independent \(Y_i\sim\operatorname{Poisson}(E_i\lambda)\), let \(D=\sum_iY_i\) and \(E=\sum_iE_i>0\). The maximum-likelihood estimate is \(D/E\). Its exact sampling variance is \(\lambda/E\), estimated by \(D/E^2\).

To verify the estimate, the likelihood, up to factors not involving \(\lambda\), is

$$ L(\lambda)\propto \prod_i e^{-E_i\lambda}(E_i\lambda)^{Y_i} \propto e^{-E\lambda}\lambda^D. $$

For \(D>0\), the log-likelihood has derivative \(D/\lambda-E\), which is zero at \(\hat\lambda=D/E\); its second derivative is \(-D/\lambda^2<0\), so this is the maximum. If \(D=0\), the likelihood is maximized at the boundary \(\hat\lambda=0\). Since a sum of independent Poisson variables is Poisson, \(D\sim\operatorname{Poisson}(E\lambda)\). Therefore \(E[D/E]=\lambda\) and \(\operatorname{Var}(D/E)=E\lambda/E^2=\lambda/E\); substituting \(\hat\lambda\) gives the stated variance estimate. \(\square\)

Worked Example: Comparing Rates With Different Follow-Up

Group 1 has 18 events during 240 person-years, and group 0 has 12 events during 120 person-years. Calculate each rate, the rate ratio for group 1 versus group 0, and an approximate 95% confidence interval for that ratio.

The rates are \(18/240=0.075\) and \(12/120=0.100\) events per person-year, or 75 and 100 events per 1,000 person-years. The rate ratio is

$$ \widehat{RR}=\frac{18/240}{12/120}=0.75. $$

Thus the estimated rate in group 1 is 25% lower than the rate in group 0. Under independent Poisson counts with fixed exposures, a large-sample delta-method approximation gives \(\operatorname{Var}(\log\widehat{RR})\approx1/18+1/12\). Its estimated standard error is

$$ \sqrt{\frac{1}{18}+\frac{1}{12}} =\sqrt{\frac{5}{36}} =0.3727. $$

The log-scale interval is \(\log(0.75)\pm1.96(0.3727)=-0.2877\pm0.7305\), or approximately \((-1.0182,0.4428)\). Exponentiating both endpoints gives a 95% interval of approximately \((0.36,1.56)\) for the rate ratio. This interval includes 1, so these data do not establish a difference at the conventional two-sided 5% level. The approximation is based on large-sample normality; with sparse counts, an exact or likelihood-based interval may be preferable.

Direct Standardization Across Strata

When groups have different stratum compositions, crude rates can differ partly because the groups contribute different proportions of exposure from each stratum. Direct standardization answers a specific adjusted question: what rate would each group have under the same chosen distribution of strata? The weights must be common across groups and fixed for the comparison. A standardized rate is not the observed rate in either group unless its stratum distribution matches the chosen standard in the relevant way.

Result: Suppose the stratum counts \(Y_{gj}\) are independent Poisson variables with means \(E_{gj}\lambda_{gj}\), where all exposures are fixed and positive. For fixed weights \(w_j\), the direct standardized estimator is \(\hat\lambda_g^{\,std}=\sum_jw_jY_{gj}/E_{gj}\). Its estimated variance is \(\sum_jw_j^2Y_{gj}/E_{gj}^2\). If the two groups are independent, the estimated variance of their standardized-rate difference is the sum of the two estimated variances.

For each stratum, \(E[Y_{gj}/E_{gj}]=\lambda_{gj}\), so the weighted estimator has expectation \(\sum_jw_j\lambda_{gj}\), the chosen standardized estimand. Independence across strata makes the variance of the weighted sum equal to the sum of the squared weights times the stratum variances. A Poisson variable with mean \(E_{gj}\lambda_{gj}\) has variance equal to its mean, so

$$ \operatorname{Var}\left(\sum_jw_j\frac{Y_{gj}}{E_{gj}}\right) =\sum_jw_j^2\frac{E_{gj}\lambda_{gj}}{E_{gj}^2} =\sum_jw_j^2\frac{\lambda_{gj}}{E_{gj}}. $$

Replacing each unknown rate \(\lambda_{gj}\) by \(Y_{gj}/E_{gj}\) gives the estimated variance in the result. For independent groups, the variance of one estimate minus the other is the sum of their variances. These formulas concern fixed weights; if weights are estimated from the same data, their uncertainty and dependence require additional treatment. \(\square\)

Worked Example: Standardizing Rates to a Common Population

Consider younger and older strata. Group A has 8 events in 400 person-years among younger people and 12 in 200 person-years among older people. Group B has 2 events in 100 person-years among younger people and 10 in 100 person-years among older people. Use standard weights 0.75 for younger and 0.25 for older. Report standardized rates per 1,000 person-years, their difference for B minus A, and a Wald interval.

The stratum-specific rates per 1,000 person-years are \(20\) and \(60\) for A, since \(8/400(1000)=20\) and \(12/200(1000)=60\). For B they are \(20\) and \(100\), since \(2/100(1000)=20\) and \(10/100(1000)=100\). Applying the same weights gives

$$ \hat\lambda_A^{\,std}=0.75(20)+0.25(60)=30,\qquad \hat\lambda_B^{\,std}=0.75(20)+0.25(100)=40. $$

The estimated difference B minus A is \(40-30=10\) events per 1,000 person-years. To calculate its uncertainty, first express each Poisson stratum-rate variance in squared units per 1,000 person-years. For A, the younger-stratum contribution is \(0.75^2(8/400^2)(1000^2)=28.125\), and the older contribution is \(0.25^2(12/200^2)(1000^2)=18.750\). Thus \(\widehat{\operatorname{Var}}(\hat\lambda_A^{\,std})=46.875\).

For B, the corresponding contributions are \(0.75^2(2/100^2)(1000^2)=112.500\) and \(0.25^2(10/100^2)(1000^2)=62.500\). Hence \(\widehat{\operatorname{Var}}(\hat\lambda_B^{\,std})=175.000\). The groups are independent, so the variance estimate for the difference is \(46.875+175.000=221.875\), and its standard error is \(\sqrt{221.875}=14.895\). The approximate 95% Wald interval is

$$ 10\pm1.96(14.895)=10\pm29.194=(-19.19,\ 39.19) $$

events per 1,000 person-years. The interval is wide and includes zero. Its negative lower endpoint does not represent a possible negative event rate; it is a feature of the unbounded Wald approximation for a difference. Inference should be interpreted in light of that approximation.

Propagating Uncertainty From Stratum Estimates

The standardization variance calculation is not limited to raw Poisson counts. If stratum-rate estimates come from fitted models, their estimated variances can be propagated through the weighted sum, provided the relevant covariance information is used. The calculation below illustrates why it is important to square the weights and to recompute every subsequent quantity from the corrected variance.

Worked Example: Checking a Standardized Difference

Suppose two independent groups have estimated stratum rates, on a common scale, of \((4,6)\) for A and \((2,10)\) for B. Use weights \((0.75,0.25)\). Suppose the fitted-model variance estimates for A's two stratum rates are \(0.2\) and \(1.6\). For B, suppose the estimated stratum variances are \(2^2/30\) and \(10^2/30\). Calculate the standardized difference B minus A and its approximate 95% Wald interval.

The weighted estimates are \(0.75(4)+0.25(6)=4.5\) for A and \(0.75(2)+0.25(10)=4.0\) for B. The difference is \(4.0-4.5=-0.5\). Under independence between strata, the variance for A is

$$ 0.75^2(0.2)+0.25^2(1.6)=0.1125+0.1000=0.2125. $$

For B, the first contribution is \(0.75^2(2^2/30)=0.5625(4/30)=0.0750\), not \(0.0667\). The second contribution is \(0.25^2(10^2/30)=0.0625(100/30)=0.2083\). Therefore the variance for B is \(0.0750+0.2083=0.2833\), and its standard error is \(\sqrt{0.2833}=0.5323\). For the difference, independence between groups gives variance \(0.2125+0.2833=0.4958\), so the standard error is \(\sqrt{0.4958}=0.7042\). The interval is

$$ -0.5\pm1.96(0.7042) \approx(-1.8801,\ 0.8801). $$

The variance inputs here are stipulated fitted-model estimates; the formula does not assert that they arise from the basic Poisson variance model. In another application, covariance between stratum estimates must also be included: for two strata, the variance has the additional term \(2w_1w_2\operatorname{Cov}(\hat\lambda_1,\hat\lambda_2)\).

Common Pitfalls and Practical Checks

The calculations above matter because a correct formula applied to the wrong denominator or estimand still answers the wrong question. Before reporting a result, check what population is represented by each exposure and whether the standard weights reflect the target comparison.

  • Using an unweighted average of record-level rates. With a common rate, the estimate is total events divided by total exposure. Averaging rates equally gives undue influence to records with little exposure.
  • Confusing people with person-time. A population count may be an appropriate denominator for a population-based rate, while unequal time at risk usually calls for person-time. State the denominator and units.
  • Changing the weights between groups. Applying each group’s own stratum proportions does not remove compositional differences. Direct standardization uses the same specified weights for both groups.
  • Forgetting squared weights or independence assumptions. A weighted variance contains \(w_j^2\), not \(w_j\). If estimates are dependent, covariance terms are needed.
  • Mixing scales or rounding too early. Convert all stratum rates and variances to the same units before combining them, and carry adequate precision through the variance and standard-error calculations.

A rate ratio and a standardized rate difference answer different questions: one is relative and dimensionless, while the other is an absolute contrast with rate units. The appropriate uncertainty calculation follows the chosen estimand. Rate-ratio intervals are commonly formed on the log scale and exponentiated; standardized-rate differences use a variance for the weighted difference. Neither calculation repairs a poorly chosen exposure, an unsupported proportional-exposure assumption, or an ill-defined target population.

Check Your Understanding

Use the definitions and assumptions stated above to answer each question.

  1. Two independent Poisson counts are observed over exposures of 40 and 160 person-years under a common rate. Why is total count divided by total exposure preferable to the unweighted average of the two observed rates?
  2. A group has 15 events over 300 person-years. Calculate its observed rate per 1,000 person-years and its plug-in Poisson standard error on that scale.
  3. Explain what a direct standardized rate estimates, and why both groups must use the same fixed stratum weights for a like-for-like comparison.
  4. For independent stratum-rate estimates, why does the variance of a weighted sum contain squared weights?
  5. When can a Wald interval for a standardized-rate difference extend below zero, and what does that endpoint mean?
Clinical Biostats