PH784: Problem Set #2

Author

Koichiro Shiba

Published

November 11, 2025

Background

In this problem set, we will continue to analyze the 2009-2012 NHANES data via the R package NHANES. This document provides comprehensive information about the package. We will use the dataset NHANES (n=10,000) and ignore sampling weights.

1. Causal Inference Under Marginal Exchangeability

Use the following variables in NHANES

  • Continuous outcome: Systolic blood pressure (unit: mm Hg)
    • BPSysAve
  • Binary exposure: Physical activity
    • PhysActive
    • Participant does moderate or vigorous-intensity sports, fitness or recreational activities (Yes or No).

See the following result from linear regression of BPSysAve on PhysActive.

Characteristic Beta 95% CI1 p-value
PhysActive
No — —
Yes -4.2 -4.9, -3.4 <0.001
1 CI = Confidence Interval

Assume that this is a perfect randomized trial where PhysActive is randomly assigned across participants. This means that it is reasonable to expect the following (marginal) exchangeability assumption to hold.

\[E[BPSysAve^a|PhysActive=Yes]=E[BPSysAve^a|PhysActive=No]\]

where \(BPSysAve^a\) is the potential value of systolic blood pressure under \(PhysActive=a\)

Q1. Explain what this exchangeability assumption means in words

Your answer


Q2. Provide mathematical notation for the statistical estimand corresponding to the regression coefficient (-4.2).

In Quarto, you can use $$ to write equations in LaTeX.

Your answer

Q3. Calculate the statistical quantity in Question 2 above without using regression.

You should get -4.2 (or something very similar, depending on rounding). Show your code.


The researcher interpreted the estimate for PhysActive as the “effect of physical activity on systolic blood pressure”. Formally, this is expressed using the counterfactual notation as follows

\[E[BPSysAve^{PhysActive=Yes}]-E[BPSysAve^{PhysActive=No}]=-4.2\]

Q4. Provide the interpretation of this causal estimand using the counterfactual language.

Your answer

2. Causal Inference Under Conditional Exchangeability

Next, consider an observational study to examine the effect of poverty on depression. The poverty in the NHANES is a continuous variable for the ratio of household income compared to poverty threshold. A team of epidemiologists decided to dichotomize this variable and create poverty.bin using 1 as a cutoff. That is, poverty.bin=1 for poverty<=1 (i.e., below the poverty guideline) and poverty.bin=0 otherwise.

The variable Depressed in NHANES has three categories (“None”, “Several”,“Most”), which was treated as a binary outcome (Depressed.bin) where Depressed.bin=0 when Depressed=="None" and otherwise Depressed.bin=1.

They performed logistic regression of Depressed.bin on poverty.bin, adjusting for age, gender, race, and education. Assume that the conditional exchangeability assumption holds after adjusting for these covariates.

Characteristic OR1 95% CI1 p-value
poverty.bin 1.88 1.58, 2.22 <0.001
Age 1.00 0.99, 1.00 0.3
Gender
female — —
male 0.68 0.60, 0.77 <0.001
Race1
White — —
Black 1.09 0.89, 1.34 0.4
Hispanic 1.26 0.96, 1.64 0.10
Mexican 1.29 1.01, 1.63 0.038
Other 0.90 0.69, 1.17 0.4
Education
8th Grade — —
9 - 11th Grade 1.30 0.95, 1.80 0.10
High School 1.02 0.75, 1.39 >0.9
Some College 0.91 0.67, 1.24 0.5
College Grad 0.66 0.48, 0.91 0.011
1 OR = Odds Ratio, CI = Confidence Interval

Now, assume that poverty.bin is rare and the estimated odds ratios approximate risk ratios. This is actually not the case in the data, but let’s make this assumption for simplicity. The risk ratio for poverty.bin is written as:

\(\frac{Pr[Depressed.bin=1|Poverty.bin=1, Age, Gender, Race, Education]}{Pr[Depressed.bin=1|Poverty.bin=0, Age, Gender, Race, Education]}\)

Under the identification assumptions, this corresponds to the causal estimand of:

\(\frac{Pr[Depressed.bin^{Poverty.bin=1}=1|Age, Gender, Race, Education]}{Pr[Depressed.bin^{Poverty.bin=0}=1|Age, Gender, Race, Education]}\)

Q6. What assumption is needed to make this interpretation? How is that assumption expressed in the logistic regression model (glm())?

Your answer

Q7. Using the summary() function, show distributions of poverty among those with poverty.bin=1 and among those with poverty.bin=0 respectively.

Q8. Based on your answer to Q7, discuss whether you think the consistency assumption for poverty.bin is reasonable. If the assumption is not valid, suggest one solution to the problem.

Your answer