Tutorials › Statistical Genetics › Inverse-Probability Weighting for Participation Bias

Selection and Bias in Prediction · Tutorial 784 of 989

Inverse-Probability Weighting for Participation Bias

Estimate who participates, weight participants to represent the target population, and assess whether positivity and weight stability support the conclusions.

Advanced 12 min read

What You'll Learn

  • Define participation probabilities and inverse-probability weights for a target population
  • Estimate participation probabilities from a population frame with observed covariates
  • State the assumptions needed for weighted score associations to represent the target population
  • Calculate a weighted score–phenotype slope and compare it with its unweighted counterpart
  • Estimate target-population mean squared prediction error using participation weights
  • Diagnose positivity problems and unstable weights

Why Weight for Participation?

A genetic prediction study usually evaluates a polygenic score among people who joined a cohort and supplied the required measurements. But participation may depend on age, health, education, or other characteristics that are also related to the score or phenotype. The participants can therefore differ systematically from the population to which the prediction is meant to apply. Inverse-probability weighting (IPW) uses measured covariates to give more influence to participants who resemble people less likely to participate.

The method does not make selective participation harmless by itself. It is justified only when the variables driving selection have been measured and the necessary participation probabilities are estimable. It also cannot reliably represent a population subgroup that has no chance of appearing among participants.

Definition: Let \(R_i=1\) if person \(i\) participates and \(R_i=0\) otherwise. Let \(X_i\) denote covariates observed for participants and available for participants and nonparticipants in a target-population frame. The participation probability is \(\pi(X_i)=P(R_i=1\mid X_i)\). For each participant, the inverse-probability weight is \(w_i=1/\pi(X_i)\). A participant with a low estimated participation probability receives a larger weight.

Estimating Participation Probabilities

To estimate \(\pi(X)\), the analyst needs information on participation status and covariates for people in the target-population frame, not only the records of participants. A common approach models \(R\) as an outcome and \(X\) as predictors. For example, a logistic regression specifies \(\operatorname{logit}\{\pi(X_i)\}=\beta_0+\beta_1X_{i1}+\cdots+\beta_kX_{ik}\), where \(\operatorname{logit}(p)=\log\{p/(1-p)\}\). The fitted probability for person \(i\) is then \(\hat{\pi}_i\), and a participating person receives weight \(1/\hat{\pi}_i\). Categorical covariates can be represented by indicator variables; flexible terms or interactions may be needed when the probability varies nonlinearly or differently across subgroups.

When the frame has a small number of categorical strata, one can estimate the probabilities directly within each stratum: the number who participated divided by the number in the frame. This is equivalent to a saturated model for those strata. Whatever the estimation method, probability predictions should be checked for calibration against observed participation rates and for implausibly small values.

Worked Example: Estimating Probabilities From a Population Frame

Suppose a hypothetical target-population frame contains 1,000 people, grouped by age. Participation and age are known for everyone, while the phenotype and score are measured only for participants.

Age groupPeople in frameParticipantsEstimated participation probabilityWeight per participant
Younger600300\(300/600=0.50\)\(1/0.50=2\)
Older400100\(100/400=0.25\)\(1/0.25=4\)

Within the younger group, each of 300 participants represents two people, so their total weighted count is \(300(2)=600\). Within the older group, each of 100 participants represents four people, so their total weighted count is \(100(4)=400\). The weighted counts reproduce the known frame totals. Older participants receive more weight because older people participated at a lower rate.

Both groups have positive estimated participation probabilities, so this example has no zero-probability stratum. That fact alone does not establish that weighting will work: the selection assumptions and the adequacy of the covariates still need consideration.

When Does Weighting Recover a Target-Population Quantity?

IPW targets a population quantity by correcting the overrepresentation of people with high participation probabilities. The core assumptions are stated in terms of the target population and the covariates used to estimate participation.

Assumptions for covariate-based participation weighting:
  • Conditional exchangeability: \(R\) is independent of the score and phenotype, jointly, given \(X\): \(R\perp(G,Y)\mid X\). Informally, after conditioning on the measured covariates, participants and nonparticipants have the same joint distribution of score \(G\) and phenotype \(Y\).
  • Positivity: every covariate pattern in the target population has a positive probability of participation: \(P(R=1\mid X=x)>0\) wherever that pattern occurs.
  • Correct participation model: the estimated probabilities adequately represent \(P(R=1\mid X)\), or are otherwise estimated well enough for the intended analysis.
  • Consistent measurement and defined target: participation status, covariates, score, and phenotype are defined comparably, and the target population is clearly specified.

Conditional exchangeability is an assumption, not something that can generally be verified using participant outcomes alone. Covariates should be chosen because they help explain participation and the distribution of the score or phenotype. Including irrelevant variables indiscriminately can make estimated probabilities more variable, while omitting important predictors of participation can leave selection bias uncorrected.

Why the Inverse Weight Works

The basic identity shows why weighting can restore a target-population mean. Let \(h(G,Y)\) be any integrable function of the score and phenotype, and suppose the assumptions above hold. Conditional on \(X\), the probability of participation is \(\pi(X)\). Conditional exchangeability means that the distribution of \(h(G,Y)\) does not differ between participants and nonparticipants within \(X\).

$$ \begin{aligned} E\left[\frac{R h(G,Y)}{\pi(X)}\mid X\right] &=\frac{E[R h(G,Y)\mid X]}{\pi(X)}\\ &=\frac{P(R=1\mid X)E[h(G,Y)\mid X,R=1]}{\pi(X)}\\ &=\frac{\pi(X)E[h(G,Y)\mid X]}{\pi(X)}\\ &=E[h(G,Y)\mid X]. \end{aligned} $$

Taking expectations over the target-population distribution of \(X\) gives \(E\{R h(G,Y)/\pi(X)\}=E\{h(G,Y)\}\). Thus, an appropriately weighted participant sample can estimate target-population means and other quantities built from means, including score–phenotype associations. In observed data, \(\pi(X)\) is replaced by its estimate, and weighted sample averages are used. With estimated probabilities, recovery is approximate and depends on model quality and sample size.

Weighted Score–Phenotype Association

For a linear score association, a weighted least-squares regression of \(Y\) on an intercept and score \(G\) estimates the slope using participant weights. The weighted slope is the weighted covariance of \(G\) and \(Y\), divided by the weighted variance of \(G\). It describes the target-population linear association under the assumptions above; it is not, by itself, a causal effect.

$$ \hat{\beta}_{w}= \frac{\sum_{i:R_i=1} w_iG_iY_i- \left(\sum_{i:R_i=1}w_iG_i\right) \left(\sum_{i:R_i=1}w_iY_i\right)\big/\sum_{i:R_i=1}w_i} {\sum_{i:R_i=1} w_iG_i^2- \left(\sum_{i:R_i=1}w_iG_i\right)^2\big/\sum_{i:R_i=1}w_i}. $$

Worked Example: A Weighted Score–Phenotype Slope

Consider four hypothetical participants. Their scores \(G_i\), phenotypes \(Y_i\), and estimated participation probabilities are shown below. The phenotype is measured in phenotype units and the score in score units.

Person\(G_i\)\(Y_i\)\(\hat{\pi}_i\)\(w_i=1/\hat{\pi}_i\)
1010.502
2120.254
3030.502
4240.254

The weighted sums are \(\sum w_i=12\), \(\sum w_iG_i=12\), \(\sum w_iY_i=32\), \(\sum w_iG_iY_i=40\), and \(\sum w_iG_i^2=20\). Substitution gives

$$ \hat{\beta}_{w} =\frac{40-(12)(32)/12}{20-12^2/12} =\frac{8}{8} =1.0000. $$

The weighted fitted slope is 1.0000 phenotype units per score unit. For comparison, the unweighted slope for these same records is

$$ \hat{\beta} =\frac{10-(3)(10)/4}{5-3^2/4} =\frac{2.5}{2.75} =\frac{10}{11} \approx 0.9091 \quad\text{phenotype units per score unit}. $$

The estimates differ because weighting changes the relative contribution of the records. The difference does not prove which estimate is closer to the target-population association. That interpretation depends on conditional exchangeability, positivity, and adequate estimation of the participation probabilities. Four records are used here only to show the arithmetic, not to support a substantive conclusion.

Weighted Prediction Performance

The same weights can estimate population-average prediction error. For predictions \(\hat{Y}_i\) made from a score or prediction model, the weighted mean squared error (MSE) among participants is

$$ \widehat{\operatorname{MSE}}_{w} =\frac{\sum_{i:R_i=1}w_i(Y_i-\hat{Y}_i)^2} {\sum_{i:R_i=1}w_i}. $$

This is a weighted average squared prediction error, in squared phenotype units. It estimates the target-population average under the same selection assumptions, provided the predictions are defined for the target population in the same way. Other performance summaries can also be expressed as weighted averages, but each must be defined for the target and scale of interest. A weighted performance estimate should not be described as evidence that the score causes the phenotype.

Worked Example: Weighting Mean Squared Prediction Error

For four hypothetical participants, suppose the estimated weights are \(2,4,2,4\). Their observed phenotypes and fixed-model predictions are as follows:

PersonWeight \(w_i\)\(Y_i\)\(\hat{Y}_i\)\((Y_i-\hat{Y}_i)^2\)
12211
24451
32330
44644

The weighted sum of squared errors is \(2(1)+4(1)+2(0)+4(4)=22\), and the sum of weights is \(2+4+2+4=12\). Therefore,

$$ \widehat{\operatorname{MSE}}_{w}=\frac{22}{12}=1.833 \quad\text{phenotype units}^2. $$

The estimate is the weighted average squared error for the target population, if the assumptions and fitted weights are adequate. It is not the unweighted average of the four squared errors, which would be \((1+1+0+4)/4=1.500\) phenotype units squared.

Positivity, Weight Stability, and Uncertainty

Positivity is both a mathematical requirement and a practical diagnostic. If a subgroup has \(\pi(X)=0\), it contributes no participants, so its score and phenotype distribution cannot be recovered from participant data by reweighting. If probabilities are merely very small, the corresponding weights become very large. A small number of such participants can dominate a weighted slope or performance estimate, making results highly variable and sensitive to individual records.

Useful diagnostics include the minimum and distribution of \(\hat{\pi}_i\), the maximum weight, the total weight, and the concentration of weighted influence in a few participants. An effective sample size summary is

$$ n_{\mathrm{eff}}=\frac{\left(\sum_{i:R_i=1}w_i\right)^2} {\sum_{i:R_i=1}w_i^2}. $$

This quantity equals the participant count when all weights are equal and decreases as weights become more unequal. It is a diagnostic summary, not a replacement for the actual sample size or a complete measure of estimator uncertainty. Uncertainty calculations should account for the weighting procedure and, when probabilities were estimated, their estimation. Resampling or appropriate variance estimators can do this when correctly implemented.

Weight truncation or stabilization can reduce extreme influence, but changes the weighting scheme and may introduce bias or change the effective target. Such choices should be justified, reported, and compared with the unmodified analysis rather than treated as automatic repairs for a positivity failure.

Common Mistakes

  • Estimating participation probabilities from participants alone. Without covariate and participation information from a target frame or a suitable external source, the participation rate by covariate pattern is generally not identified from the participant records alone.
  • Assuming weighting removes all selection bias. Weighting addresses selection only under conditional exchangeability and a suitable participation model. Unmeasured predictors of participation related to score or phenotype can leave bias.
  • Ignoring very large weights. A large weight is not automatically a virtue: it may signal near-violation of positivity and produce an unstable estimate.
  • Calling a weighted association causal. Reweighting can target a population association; it does not by itself establish that changing a genetic score would change the phenotype.
  • Confusing a weighted estimate with a certainty about the target. A weighted result remains subject to sampling variability, model error, and the assumptions used to transport from participants.
Key takeaway: IPW gives each participant influence inversely proportional to the estimated chance of participation. It can recover target-population score associations and performance only when relevant selection differences are captured by measured covariates, participation probabilities are positive and adequately estimated, and the weights are sufficiently stable.

Check Your Understanding

Answer each question by stating the assumptions or arithmetic that support your conclusion.

  1. A target frame contains 800 people in a covariate stratum, of whom 200 participate. What is the estimated participation probability and the corresponding inverse-probability weight?
  2. Why is it not generally possible to estimate participation probability by age using only a data set containing participants?
  3. State the conditional exchangeability assumption needed to use participation weights for a score–phenotype association.
  4. If one subgroup in the target population has estimated participation probability zero, can inverse-probability weighting recover its score distribution from participants? Explain.
  5. Why can a few very large weights make a weighted prediction-performance estimate unstable?
Clinical Biostats