Week 12: Missing data

PS 812 - Introduction to Statistical Methods in Political Science

Anton Strezhnev

University of Wisconsin-Madison

November 24, 2026

Welcome back!

\[ \newcommand{\Var}{\text{Var}} \newcommand{\Cov}{\text{Cov}} \newcommand{\Corr}{\text{Corr}} \newcommand{\indep}{\mathrel{\perp\mkern-10mu\perp}} \newcommand{\nindep}{\not\indep} \]

Where does uncertainty come from?

  • We’ve spent a lot of time focusing on randomness from sampling from a population
    • Our sample mean is not the same as the population mean
    • Statistics gives us some tools for characterizing that error (sampling variance)
  • But what happens if we have the full population?
    • All 193-197 countries in the world
    • All 50 states.
    • A set of the specific villages we’re interested in.
  • Key idea: Uncertainty comes from the stuff we don’t see
    • And solutions require knowing the mechanism by which we don’t see things!

Sampling from a population

A finite population

A finite population

  • \(N\) units with outcomes \(Y_1, Y_2, \dots, Y_N\)

    • We’ll treat these as fixed
  • Estimand: the population mean

    \[\mu_N = \frac{1}{N}\sum_{i=1}^N Y_i\]

  • and the population variance

    \[S^2 = \frac{1}{N-1}\sum_{i=1}^N (Y_i - \mu_N)^2\]

  • If we saw every \(Y_i\), there would be no uncertainty at all.

Simple random sampling

  • Let \(R_i\) be the inclusion indicator

    • \(R_i = 1\) if unit \(i\) is in the sample
    • \(R_i = 0\) if not
    • \(\sum_{i=1}^N R_i = n\) - our sample is the number of “included” units.
  • Simple random sampling (SRS): each of the \(\binom{N}{n}\) subsets of size \(n\) is equally likely

  • Each unit has the same inclusion probability

    \[\Pr(R_i = 1) = \frac{n}{N}\]

  • But the \(R_i\) are not independent - the joint inclusion probability is not the product of the marginals

    \[\Pr(R_i = 1, R_j = 1) = \Pr(R_i = 1) \Pr(R_j = 1 | R_i = 1)= \frac{n}{N}\cdot\frac{n-1}{N-1}\]

Simple random sampling

  • So there’s a covariance we have to care about

    \[\begin{aligned} \Cov(R_i, R_j) &= \Pr(R_i = 1, R_j = 1) - \Pr(R_i = 1)\Pr(R_j = 1)\\ &= \frac{n}{N}\cdot\frac{n-1}{N-1} - \frac{n}{N}\cdot \frac{n}{N}\\ &= \frac{n^2 - n}{N(N - 1)} - \frac{n^2}{N^2}\\ &= \frac{(n^2 - n)N - n^2(N - 1)}{N^2(N - 1)} \\ &= \frac{n^2 - nN}{N^2(N - 1)} \\ &= -\frac{n(N - n)}{N^2(N - 1)} = -\frac{1}{N-1} \cdot \frac{n}{N} \cdot \frac{N-n}{N}\\ &= -\frac{\Var(R_i)}{N - 1} \end{aligned}\]

The sample mean is unbiased

  • We can write the sample mean as an average involving the inclusion indicator \(R_i\)

    \[\hat{\mu} = \frac{1}{n}\sum_{i=1}^N R_i Y_i\]

  • The \(Y_i\) are constants, so they come out of the expectation

    \[\mathbb{E}[\hat{\mu}] = \frac{1}{n}\sum_{i=1}^N \mathbb{E}[R_i]\, Y_i = \frac{1}{n}\sum_{i=1}^N \frac{n}{N}\, Y_i = \mu_N\]

The variance of the sample mean

  • Recenter around the mean \(\mu_N\)

    \[\hat{\mu} - \mu_N = \frac{1}{n}\sum_{i=1}^N R_i\,(Y_i - \mu_N)\]

  • Only the \(R_i\) are random

    \[\Var(\hat{\mu}) = \frac{1}{n^2}\Big[\sum_{i} (Y_i - \mu_N)^2\,\Var(R_i) + \sum_{i \neq j} (Y_i - \mu_N)(Y_j - \mu_N)\Cov(R_i, R_j)\Big]\]

  • The covariance terms don’t go away since the \(R_i\) are negatively correlated

The variance of the sample mean

  • Deviations from the mean sum to zero, so

    \[\begin{aligned} 0 = \Big(\sum_{i} (Y_i - \mu_N)\Big)^2 &= \sum_{i} (Y_i - \mu_N)^2 + \sum_{i \neq j} (Y_i - \mu_N)(Y_j - \mu_N) \\ \Rightarrow \quad \sum_{i \neq j} (Y_i - \mu_N)(Y_j - \mu_N) &= -\sum_i (Y_i - \mu_N)^2 \end{aligned}\]

  • Plug in \(\Cov(R_i, R_j) = -\frac{\Var(R_i)}{N-1}\)

    \[\begin{aligned} \Var(\hat{\mu}) &= \frac{\Var(R_i)}{n^2}\Big[\sum_i (Y_i - \mu_N)^2 + \frac{1}{N-1}\sum_i (Y_i - \mu_N)^2\Big] \\ &= \frac{\Var(R_i)}{n^2} \cdot N \cdot \underbrace{\frac{1}{N-1}\sum_i (Y_i - \mu_N)^2}_{S^2} \\ &= \frac{1}{n^2}\cdot\frac{n}{N}\left(1 - \frac{n}{N}\right) \cdot N S^2 \\ &= \left(1 - \frac{n}{N}\right)\frac{S^2}{n} \end{aligned}\]

Estimating the variance

  • Plug in the sample variance

    \[s^2 = \frac{1}{n-1}\sum_{i=1}^N R_i\,(Y_i - \hat{\mu})^2 \qquad \widehat{\Var}(\hat{\mu}) = \left(1 - \frac{n}{N}\right)\frac{s^2}{n}\]

  • Under SRS, \(\mathbb{E}[s^2] = S^2\), so \(\widehat{\Var}(\hat{\mu})\) is exactly unbiased

  • A finite population CLT applies here (Hájek 1960): as \(n\) and \(N - n\) grow

    \[\frac{\hat{\mu} - \mu_N}{\sqrt{\widehat{\Var}(\hat{\mu})}} \xrightarrow{d} \mathcal{N}(0, 1)\]

  • So the usual interval \(\hat{\mu} \pm 1.96\sqrt{\widehat{\Var}(\hat{\mu})}\) works

From finite populations back to i.i.d.

  • As \(N \to \infty\), \(\frac{n}{N} \to 0\) and

    \[\Var(\hat{\mu}) = \left(1 - \frac{n}{N}\right)\frac{S^2}{n} \to \frac{\sigma^2}{n}\]

  • Sampling without replacement from a huge population \(\approx\) i.i.d. draws

    • The “infinite population” is a limit of the finite population seetting
  • We can apply this idea beyond random sampling from a finite population to other forms of missingness

The missing data problem

  • For each unit we observe \((Y_i^*, R_i, X_i)\), where

    \[Y_i^* = \begin{cases} Y_i & R_i = 1 \\ \texttt{NA} & R_i = 0 \end{cases}\]

  • \(R_i\) works the same way (do we observe \(Y_i\) or not), but now it’s out of our control

    • We don’t know \(\Pr(R_i = 1)\) and can’t assume that \(R_i\) is independent of \(Y_i\)
  • Law of iterated expectations conditioning on \(R_i\):

    \[\mathbb{E}[Y_i] = \mathbb{E}[Y_i \mid R_i = 1]\Pr(R_i = 1) + \underbrace{\mathbb{E}[Y_i \mid R_i = 0]}_{\text{never observed}}\Pr(R_i = 0)\]

Example: who won’t report their income?

  • 2024 CES: “Thinking back over the last year, what was your family’s annual income?”
    • 8.5% of 59,784 respondents choose “Prefer not to say”
  • Outcome of interest
    • \(Y_i = 1\) if family income is $60,000 or more
  • Covariates (\(X_i\)) observed for all units
    • Age, gender, education, race, employment, marital status, party ID, political engagement

Example: who won’t report their income?

  • Political engagement - non-response to four questions on politics
    • Over the past year, has the nation’s economy gotten better or worse?
    • Generally speaking, do you think of yourself as a Democrat, a Republican, an Independent…? (party ID)
    • In general, how would you describe your own political viewpoint? (ideology)
    • Do you follow what’s going on in government and public affairs…? (interest)
“Not sure” answers Respondents Refuse income Income $60k+ (if answered)
0 54,034 7.7% 51%
1 4,229 14.0% 28%
2 1,135 19.2% 18%
3 or 4 386 30.6% 12%

What can we learn without assumptions?

  • Suppose \(Y_i \in [a, b]\). Then \(\mathbb{E}[Y_i \mid R_i = 0]\) is somewhere in \([a, b]\)

  • We can get bounds by plugging in the two extremes (Manski 1989)

    \[\mathbb{E}[Y_i] \in \Big[\,\underbrace{\mathbb{E}[Y_i \mid R_i = 1]\Pr(R_i = 1) + a\Pr(R_i = 0)}_{\text{lower bound: } \mathbb{E}[Y_i \mid R_i = 0] = a},\ \ \underbrace{\mathbb{E}[Y_i \mid R_i = 1]\Pr(R_i = 1) + b\Pr(R_i = 0)}_{\text{upper bound: } \mathbb{E}[Y_i \mid R_i = 0] = b}\,\Big]\]

p_R <- mean(ces$R)
cc  <- mean(ces$inc60[ces$R == 1])                # the complete-case mean
c(complete_case = cc,
  lower = cc * p_R + 0 * (1 - p_R),               # every refuser earns under $60k
  upper = cc * p_R + 1 * (1 - p_R))               # every refuser earns $60k or more
complete_case         lower         upper 
    0.4850209     0.4435802     0.5290211 

Rubin’s taxonomy

  • Missing completely at random (MCAR)

    \[R_i \indep Y_i\]

  • Missing at random (MAR)

    \[R_i \indep Y_i \mid X_i\]

  • Missing not at random (MNAR):

    \[R_i \nindep Y_i \mid X_i\]

  • Terms originated from Rubin (1976) - not the best language.

    • “At random” does not mean “random”: MAR allows missingness to depend on \(X_i\)
    • Rubin’s “at random” is closer to “according to known non-randomness”

Missing completely at random

  • Under MCAR, respondents look like nonrespondents

    \[\mathbb{E}[Y_i] = \mathbb{E}[Y_i \mid R_i = 1]\]

  • The complete-case mean is consistent for \(\mathbb{E}[Y_i]\)

    • Missingness behaves like random sampling from a target population

Missing at random

Missing at random

  • MAR: within levels of \(X_i\), missingness is unrelated to \(Y_i\)

    \[R_i \indep Y_i \mid X_i\]

  • Plus positivity: Have to have some probability of responding at each covariate level.

    \[\Pr(R_i = 1 \mid X_i = x) > 0 \quad \text{for all } x\]

  • MCAR within each stratum of \(X_i\)

    • But the response rate can differ across strata
    • The complete-case mean is biased when \(X_i\) predicts both \(R_i\) and \(Y_i\)

Identification under MAR

  • Law of iterated expectations followed by MAR

    \[\mathbb{E}[Y_i] = \mathbb{E}\big[\mathbb{E}[Y_i \mid X_i]\big] = \mathbb{E}\big[\mathbb{E}[Y_i \mid R_i = 1, X_i]\big]\]

    • Everything on the right is observable
  • Regression imputation: fit \(\mathbb{E}[Y_i \mid R_i = 1, X_i]\), then compute:

    \[\hat{\mu}_{\text{reg}} = \frac{1}{n}\sum_{i=1}^n \hat{\mathbb{E}}[Y_i \mid R_i = 1, X_i]\]

  • Take the observed relationship between \(Y_i\) and \(X_i\) among respondents

    • And impute the missing values for the full sample.

Missing not at random

  • Even given \(X_i\), missingness depends on \(Y_i\)

    \[\mathbb{E}[Y_i \mid R_i = 0, X_i] \neq \mathbb{E}[Y_i \mid R_i = 1, X_i]\]

  • Can’t tell whether we’re in MAR or MNAR from the data alone!

    • Analogous to unobserved confounding of response and outcome.

The propensity score for missingness

  • Under missing at random, we only need to know one thing in order to fully adjust for non-response bias.

  • The response propensity score:

    \[p_R(x) = \Pr(R_i = 1 \mid X_i = x)\]

  • Conditioning on \(p_R(X_i)\) is enough to get rid of the bias (Rosenbaum and Rubin 1983)

    \[R_i \indep Y_i \mid X_i \quad\Rightarrow\quad R_i \indep Y_i \mid p_R(X_i)\]

  • Adjusting for the propensity score is as good as adjusting for all of \(X_i\)

Reweighting the respondents

Horvitz-Thompson

  • Consider an estimator that re-weights each respondent by their inverse propensity (Horvitz and Thompson 1952)

    \[\hat{\mu}_{\text{HT}} = \frac{1}{n}\sum_{i=1}^n \frac{R_i Y_i^*}{p_R(X_i)}\]

  • This is the Horvitz-Thompson or “inverse propensity weighting” (IPW) estimator

  • Can think of this as creating a pseudo-population where each respondent stands in for \(1 / p_R(X_i)\) people like them.

    • Under-represented respondents count for more
    • Over-represented respondents count for less

Horvitz-Thompson is unbiased under MAR

  • With \(p_R\) known, and since \(R_i Y_i^* = R_i Y_i\)

    \[\begin{aligned} \mathbb{E}[\hat{\mu}_{\text{HT}}] = \mathbb{E}\left[\frac{R_i Y_i}{p_R(X_i)}\right] &= \mathbb{E}\left[\frac{\mathbb{E}[R_i Y_i \mid X_i]}{p_R(X_i)}\right] \\ &= \mathbb{E}\left[\frac{\mathbb{E}[R_i \mid X_i]\,\mathbb{E}[Y_i \mid X_i]}{p_R(X_i)}\right] \qquad \text{(MAR)} \\ &= \mathbb{E}\big[\mathbb{E}[Y_i \mid X_i]\big] = \mathbb{E}[Y_i] \end{aligned}\]

  • Positivity ensures we don’t divide by zero

Hájek

  • The HT weights \(\frac{R_i}{p_R(X_i)}\) only sum to \(n\) on average.

  • The Hájek estimator (stabilized IPW) normalizes them to sum to exactly 1 in the sample (Hájek 1971)

    \[\hat{\mu}_{\text{Hájek}} = \frac{1}{\sum_{i=1}^n \frac{R_i}{p_R(X_i)}}{\sum_{i=1}^n \frac{R_i Y_i^*}{p_R(X_i)}}\]

  • Has a clean interpretation as a convex average of the respondents

    • Slightly biased, consistent, usually lower variance than HT

IPW in the running example

ps_fit <- glm(R ~ age + I(age^2) + educ + race + gender + employ + marstat + factor(pid7) +
                factor(pmin(unsure, 3)), family = binomial, data = ces)
ces <- ces |> mutate(p_hat = fitted(ps_fit), y_star = replace_na(inc60, 0))
ces |> summarize(complete_case = mean(inc60, na.rm = TRUE),
                 ht    = mean(R * y_star / p_hat),
                 hajek = sum(R * y_star / p_hat) / sum(R / p_hat))
# A tibble: 1 × 3
  complete_case    ht hajek
          <dbl> <dbl> <dbl>
1         0.485 0.483 0.483
  • Refusers are less politically engaged, and less politically engaged respondents earn less
  • Weighting moves the estimate down, by 0.2 percentage points
  • Weights run from 1.01 to 2.91
    • the largest go to young students who are unsure about politics
  • Size of the bias and adjustment is proportional to the magnitude of non-response
    • Only 8.5% refuse.

Problems with weights

  • \(\hat{p}_R(x)\) near \(0\) means huge weights

    • A few respondents drive the estimate \(\leadsto\) massive variance
    • Effective sample size: \(n_{\text{eff}} = \big(\sum_i w_i\big)^2 / \sum_i w_i^2\)
  • Positivity fails: no respondents to re-weight to!

  • Misspecified \(\hat{p}_R\): the weights don’t balance \(X_i\)

    • Solution: balancing weights - compute \(\hat{p}_R\) such that we get exact balance on (functions of) \(X_i\)
  • Standard errors:

    • Need to account for uncertainty in estimating the weights.

Next week

  • Survey weighting is a missing data problem
    • Stratified and clustered sampling: non-random or correlated selection by design
    • Post-stratification and raking to adjust for nonresponse
    • The same Horvitz-Thompson and Hájek estimators!

References

Hájek, Jaroslav. 1960. “Limiting Distributions in Simple Random Sampling from a Finite Population.” Publications of the Mathematical Institute of the Hungarian Academy of Sciences 5: 361–74.
Hájek, Jaroslav. 1971. “Comment on ‘an Essay on the Logical Foundations of Survey Sampling, Part One’ by D. Basu.” In Foundations of Statistical Inference, edited by V. P. Godambe and D. A. Sprott. Holt, Rinehart; Winston.
Horvitz, Daniel G., and Donovan J. Thompson. 1952. “A Generalization of Sampling Without Replacement from a Finite Universe.” Journal of the American Statistical Association 47 (260): 663–85. https://doi.org/10.1080/01621459.1952.10483446.
Manski, Charles F. 1989. “Anatomy of the Selection Problem.” Journal of Human Resources 24 (3): 343–60. https://doi.org/10.2307/145818.
Rosenbaum, Paul R., and Donald B. Rubin. 1983. “The Central Role of the Propensity Score in Observational Studies for Causal Effects.” Biometrika 70 (1): 41–55. https://doi.org/10.1093/biomet/70.1.41.
Rubin, Donald B. 1976. “Inference and Missing Data.” Biometrika 63 (3): 581–92. https://doi.org/10.1093/biomet/63.3.581.