PH784 Advanced Social Epidemiology: Methods

Week 2: Causal Inference & Social Epi

Koichiro Shiba

Boston University School of Public Health

September 15, 2025

Structure

  1. Causal Inference Intro
    • General Overview
  2. Challenges in Social Epi
    • Consistency

Social Epidemiologic Questions

  • Assessing/Monitoring Health Inequalities
    • (Mostly) descriptive
  • Social Determinants of Health
    • Individual, inter-personal, neighborhood, macro-level social factors
    • Causal
      • Today’s focus

We will discuss the intersection of these two in Week 5

Goal of Causal Inference

Potential outcome framework

  • Quantitative
  • Estimating the causal effect of a hypothetical intervention
    • Even in observational studies
    • e.g., \(E[Y^{a=1}-Y^{a=0}]\)
      • \(Y^a\): Potential outcome under a binary treatment \(A=a\)
        • More generally, \(E[Y^{a}-Y^{a^*}]\)
      • “Difference in mean outcome had everyone been exposed vs had everyone been unexposed”
  • Not establishing causality

Conceptualizing a Hypothetical Intervention (in Social Epi)?

  • ALL causal inference is doing this

Benefits of explicitly conceptualizing a hypothetical intervention

  1. Rigorous study design
  2. Clearer causal questions & interpretation
    • Greater relevance to the real world

Conceptualizing a Hypothetical Intervention (in Social Epi)?

Common critiques

  • “It narrows the scope of science!”
    • Not negating other approaches for causality/scientific discoveries
  • “Impossible with observational data!” & “Only correlational!”
    • Sure, it is more challenging. But isn’t it what you are doing anyway?
  • “Not all social factors can be intervened!”
    • Why would you be interested in effects of something you cannot change?
      • More on this later today

Interpret Estimated Effects of SDoH

  • Social factors sometimes have small “effect sizes” compared to genetic/clinical factors

Why should we care SDoH, even those with small “effect sizes”?

  • Upstream/root cause
  • Takes time for effects to manifest
  • Greater population impacts

“Effect Size” and Population Impacts

Hypothetical scenario

  • Effect of a binary (protective) social exposure \(A\) on a disease \(Y\): RR=0.98
    • How many cases can be prevented by assigning this exposure to unexposed individuals?
    • Baseline outcome risk among the unexposed: 10%
# Intervened # Cases # Cases if Intervened # Cases Prevented
1,000 100
10,000 1,000
100,000 10,000

“Effect Size” and Population Impacts

Hypothetical scenario

  • Effect of a binary (protective) social exposure \(A\) on a disease \(Y\): RR=0.98
    • How many cases can be prevented by assigning this exposure to unexposed individuals?
    • Baseline outcome risk among the unexposed: 10%
# Intervened # Cases # Cases if Intervened # Cases Prevented
1,000 100 98 2
10,000 1,000 980 20
100,000 10,000 9,800 200
  • Greater population impacts with increasing # of those intervened 1
    • What determines this number?

“Effect Size” and Population Impacts

What determines “# Intervened”?

  1. Exposure distributions
    • Rare exposures with strong “effects” vs common exposures with modest effects
      • e.g., genetic mutation vs neighborhood environment
  2. Scope of interventions
    • Targeted interventions vs population approaches
      • e.g., clinical practice vs policies
  • Causal \(RR=Pr[Y=1^{a=1}]/Pr[Y=1^{a=0}]\)
    • “Had everyone been exposed vs unexposed”
      • Ignoring “# Intervened”
      • Change the definition of effects (Week 5) or use population impact metrics (e.g., PAF)

Summary 1

  • Causal inference is a task of causal effect estimation
    • Mathematical definition of causal effects based on the potential outcome framework
    • Effect of a “hypothetical intervention”
  • Consider population-level impacts when interpreting estimated effects of SDoH

Common Approach in SDoH Research

  • Regress an outcome of interest on
    • Social exposure
    • Adjusting for many covariates
      • Interpret the coefficient as the “effect” of the social variable
  • What effects are we estimating?
  • What are the underlying assumptions?

Formal Causal Inference: Big Picture

Three steps of causal inference

  • General approach for causal inference
  • You will always get some “numbers” from statistical analyses
    • Do they have the interpretation that you hope them to have?
    • Which of these is your “fancy method” improving?
  • Challenges in social epi
    • Mostly estimand and identification

Estimand, Estimator, Estimate

Step 1: Specifying Causal Estimand

Defining a question that you are trying to answer

  • Common causal estimand
    • Average treatment effect (ATE): \(E[Y^{a=1}-Y^{a=0}]\)
    • Conditional average treatment effect (CATE): \(E[Y^{a=1}-Y^{a=0}|L]\)

Specifying Causal Estimand

Defining a question that you are trying to answer

  • Causal effect: \(E[Y^{a=1}-Y^{a=0}]\)
    • Specific to the study population
      • Transportability
    • Summarized as an expected change in mean outcome
      • Can we summarize the outcome differently?
  • What is the “hypothetical intervention”?

Causal estimand

Example: the effect of smoking

  • Prevalence difference: \(Pr[Y^{a=1}=1]-Pr[Y^{a=0}=1]\)
    • “Had everyone smoked vs had nobody smoked”
    • Is this a well-defined hypothetical intervention?

Causal estimand

Example: the effect of smoking

  • To specify a well-defined hypothetical intervention, consider:
    • What treatment to implement
      • What type of smoking? (e.g., vaping, tobacco)
      • Dose? (once a week? how many?)
        • Consistency (will be discussed today)
    • How to implement
      • Initiation vs cessation
      • Treatment regimen (e.g., stop smoking now vs forever)

Causal Identification

Where the magic happens

Identification assumptions

  1. Exchangeability
  2. Positivity
  3. Consistency

Exchangeability

Attributing outcome differences to an exposure

  • \(E[Y^a|A=1]=E[Y^a|A=0]\)
    • Intuition: “Fair comparisons”
    • “The exposed and the unexposed would have the same outcome had they received the same exposure level”
    • “The two groups are similar except for their exposure levels”
  • a.k.a., Ignorability, “no confounding” assumption
    • Can be violated due to confounding, selection bias, measurement errors
      • Is this valid in RCTs?
      • How about in observational studies?

Conditional exchangeability

  • \(E[Y^a|A=1, L]=E[Y^a|A=0, L]\)
    • Exchangeability within strata of (or conditional on) \(L\)
  • Interpretation?
    • “Among those with the same \(L\), the exposed and the unexposed would have the same outcome with the same exposure level”
      • “(Thus, the difference in \(Y\) is attributable to \(A\))”
    • “After adjusting for \(L\), there is no confounding (and other sources of non-exchangeability)”
      • A standard assumption underlying regression adjustment

Positivity

A conceptual & practical issue

  • \(Pr[A=a|L=l]>0\)
    • Intuition: “We can compare different exposure levels”
    • “Within \(L\), there are both exposed and unexposed people”
  • Potential violation?
    • Structural violation
      • “the effect of retirement among newborn babies”
      • Zero treatment propensity, even with infinite data
        • Carefully choose target population and define causal estimand
    • Random violation
      • “In my data, those who are 57 years old and earn $80K per year are all exposed”
      • No variation in exposure within finite data but can have non-zero propensity in principle
        • Can be addressed via model interpolation or ensuring common support (e.g., PS matching)

Consistency

  • \(Y^a=Y\) when \(A=a\)
    • Intuition: “The observed outcome \(Y\) of the exposed is equal to what the outcome would have been had they been exposed”
    • Seems obvious? Any potential violation?
  • Can be violated when an exposure corresponds to multiple versions of potential interventions
    • Compound treatment
    • Versions with different effects
      • Obesity, income, “risk scores”, “index”, “exercise > 30 minutes/day”

Consistency

  • The effect of “aspirin”
    • Dose? Frequency? With or without food?
  • The effect of “a daily tablet of 150 mg of aspirin before breakfast”
    • With left vs right hand?
      • Same effect
      • Sufficiently well-defined
      • The treatment-variation irrelevance assumption

Consequences of ill-defined exposures

  • Unclear actions
  • Transportability
  • Potentially ill-justified confounding adjustment

Identification Using Assumptions

Under the identification assumptions, let’s connect the counterfactual outcome to the factual outcome

  1. \(E[Y^{a=1}|L]= E[Y^{a=1}|A=1, L]\)
    • conditional exchangeability
  2. \(E[Y^{a=1}|A=1, L]=E[Y|A=1, L]\)
    • consistency

Unobservable causal estimand is reduced to observable statistical estimand

Estimation

  • How do we estimate \(E[Y|A=1, L]-E[Y|A=0,L]\)?
    • “Difference in conditional expected values of \(Y\)”
      • This is what regression estimates

Example: BMI by race and gender in NHANES data

Code
pacman::p_load(tidyverse, broom, tinytable, NHANES) # load packages
# Using regression
NHANES |> mutate(Race1 = factor(Race1, ordered = F) |> 
    relevel(Race1, ref = "White")) |>
    filter(Race1 %in% c("Black","White")) |>
    lm(formula = BMI~ Race1*Gender) |> tidy() |>
    select(term, estimate) |> 
    tt() |> 
    format_tt(digits = 2)     
# Manual pair-wise comparison
NHANES |> group_by(Race1, Gender) |> 
    summarize(mean = mean(BMI, na.rm = T)) |> 
    filter(Race1 %in% c("Black","White")) |> 
    tt(digits = 4)

Using regression

term estimate
(Intercept) 26.64
Race1Black 3.14
Gendermale 0.16
Race1Black:Gendermale -3.6
  • The estimate for Race1Black: \(3.14\)
    • Interpretation?
    • “Estimated association between black race (vs white) and BMI among female”

Manual pair-wise comparison

Race1 Gender mean
Black female 29.78
Black male 26.34
White female 26.64
White male 26.8
  • Difference in BMI between black and white among female: \(29.78-26.64=3.14\)
    • \(E[Y|A=1, L=0]-E[Y|A=0,L=0]\)
      • \(A=1\) for black and \(L=0\) for female.

Estimation

Regression: intuition

\(E[Y|A=2]\)

Code
# Generate synthetic data for left plot
set.seed(123)
n1 <- 30
n2 <- 25  
n3 <- 35
n4 <- 20

# Data for A=1
a1_data <- data.frame(
  A = rep(1, n1),
  Y = c(runif(10, 10, 30), runif(20, 12, 28))
)

# Data for A=2  
a2_data <- data.frame(
  A = rep(2, n2),
  Y = c(runif(8, 20, 30), runif(17, 30, 38))
)

# Data for A=3
a3_data <- data.frame(
  A = rep(3, n3),
  Y = c(runif(15, 30, 50), runif(20, 45, 58))
)

# Data for A=4
a4_data <- data.frame(
  A = rep(4, n4),
  Y = c(runif(10, 40, 55), runif(10, 55, 63))
)

# Combine data
plot1_data <- rbind(a1_data, a2_data, a3_data, a4_data)

# Create plot
library(ggplot2)
ggplot(plot1_data, aes(x = A, y = Y)) +
  geom_point(size = 2, alpha = 0.8) +
  scale_x_continuous(breaks = 1:4, limits = c(0.5, 4.5)) +
  scale_y_continuous(breaks = seq(10, 60, 10), limits = c(5, 65)) +
  theme_minimal() +
  theme(
    axis.title = element_text(size = 18),
    axis.text = element_text(size = 18),
    plot.margin = margin(20, 20, 20, 20)
  ) +
  labs(x = "A", y = "Y")

Code
mean.a2 <- mean(a2_data$Y)

# Create plot
ggplot(plot1_data, aes(x = A, y = Y)) +
  geom_point(size = 2, alpha = 0.8) +
  geom_point(size = 5, shape = 23, fill = "#be2f3a", aes(x = 2, y = mean.a2)) +
  scale_x_continuous(breaks = 1:4, limits = c(0.5, 4.5)) +
  scale_y_continuous(breaks = seq(10, 60, 10), limits = c(5, 65)) +
  theme_minimal() +
  theme(
    axis.title = element_text(size = 18),
    axis.text = element_text(size = 18),
    plot.margin = margin(20, 20, 20, 20)
  ) +
  labs(x = "A", y = "Y")

Estimation

Regression: intuition

\(E[Y|A=5]\)

Code
# Generate synthetic data for right plot (more spread out)
set.seed(456)

# Create data with increasing trend
a_values <- runif(100, 0, 8)
y_values <- 2 + 4.5 * a_values + rnorm(100, 0, 3)
y_values <- pmax(y_values, -2)  # Ensure no negative values too extreme

plot2_data <- data.frame(A = a_values, Y = y_values) 

# Remove observations with A = 5 (within tolerance)
plot2_data <- plot2_data[abs(plot2_data$A - 5) > 1, ]

# Create plot
ggplot(plot2_data, aes(x = A, y = Y)) +
  geom_point(size = 2, alpha = 0.8) +
  scale_x_continuous(breaks = 0:8, limits = c(-0.5, 8.5)) +
  scale_y_continuous(breaks = seq(0, 40, 10), limits = c(-5, 45)) +
  theme_minimal() +
  theme(
    axis.title = element_text(size = 18),
    axis.text = element_text(size = 18),
    plot.margin = margin(20, 20, 20, 20)
  ) +
  labs(x = "A", y = "Y")

Code
# Create plot
ggplot(plot2_data, aes(x = A, y = Y)) +
  geom_point(size = 2, alpha = 0.8) +
  geom_smooth(method = "lm", se = F, color = "#457b9d") +
  geom_point(size = 5, shape = 23, fill = "#be2f3a", aes(x = 5, y = 25)) +
  scale_x_continuous(breaks = 0:8, limits = c(-0.5, 8.5)) +
  scale_y_continuous(breaks = seq(0, 40, 10), limits = c(-5, 45)) +
  theme_minimal() +
  theme(
    axis.title = element_text(size = 18),
    axis.text = element_text(size = 18),
    plot.margin = margin(20, 20, 20, 20)
  ) +
  labs(x = "A", y = "Y")

Estimation

  • Regression analysis
    • Making educated guess about conditional expected values
      • By borrowing information from other observations (model interpolation)
        • With modeling assumptions (e.g., linearity, no product terms)
          • CATE or ATE?
      • Pure prediction task after identification
        • Causal inference meets prediction!

You get meaningless “numbers” with:

  • Good estimation but bad identification
  • Good identification but bad estimation

Modeling in Practice

  • Simple model with stronger assumptions (most parametric regression)
    • More efficient but more biased
  • Complex model with weaker assumptions
    • Less biased but less efficient

Solutions to the bias-variance trade-off

  • Doubly-robust estimation (e.g., TMLE) 1
  • Non-parametric & data-adaptive approach (e.g., machine learning, SuperLearner) 2
    • Generally better performance 3
      • But potentially small gain with small and less complex data
        • Social epi?

Causal Inference: Big Picture

  • Unjustified fancy methods, unreasonable critiques
    • “Propensity scores can strengthen confounding adjustment!”
    • “Never use data-driven methods in causal research. Use theories!”
      • Could be useful for estimation.

Always distinguish these steps when you learn, read, and respond

Summary 2

  • Three steps of causal inference
    1. Specifying causal estimand
    2. Identification with assumptions
      • exchangeability, positivity, consistency
    3. Estimation via statistical models
  • Interpretation & data

Causal Inference in Social Epidemiology

  • Data (Week 4)
    • Measuring intangible & complex social constructs
  • Causal Estimand (Week 5)
    • Multi-level, distributional, population impacts
  • Identification
    • Exchangeability (Week 3)
    • Consistency (Today)

Consistency Assumption for Social Exposures

  • \(Y^a=Y\) when \(A=a\)
    • Intuition: “The observed outcome \(Y\) of the exposed is equal to what the outcome would have been had they been exposed”
    • Corresponding interventions?

Challenges

  • Multiple versions (compound treatment)
    • Crude definition (social participation, neighborhood vulnerability)
      • Often harder to achieve the treatment-variation irrelevance assumption
  • Nonmanipulable?
    • What interventions would correspond to the “effect of race”?

Galea-Hernan 2019 AJE Article

Claim: Move to the right of the proposed spectrum of social exposures

Responses to Galea & Hernan (2019)

Responses concerning the consistency assumption for social exposures

  1. Robinson and Bailey (2020)
    • Causal effect estimation is not the only goal of social epi
      • (Preliminary) evidence to “establish or rule out causation”
        • “Can genetic differences explain racial disparities?”
      • Changes are driven by basic beliefs & narratives about causality, cultural values, attribution of moral responsibility rather than precise quantitative estimates
    • Can fall into the “reductionism trap”
  1. Jackson and Arah (2020)
    • System preserving
    • Systems and effect

Responses to Galea & Hernan (2019)

  1. VanderWeele (2020)
    • Quantitative potential-outcome framework for social exposures on the “left end”

Alternative approaches for ill-defined social exposures

  1. Redefine the exposure (to make modifiability more explicit)
  2. Changing interpretation
  3. Shifting the target of interventions

Approach 1: Redefining Exposures

  • The effect of “race”
    • Hypothetical intervention?
    • Changing skin color? Label assigned at birth?
    • Race as a social construct
  • Not saying we should avoid studies of “race”
    • Quantitative causal inference as a tool is more useful for well-defined exposures

Approach 2: Changing Interpretation

  • Social participation \(A=1\) (vs no participation: \(A=0\))
    • Version 1: ≥ once a week (\(K(1)=1\))
    • Version 2: less often (\(K(1)=2\))

Possible interpretations

  1. Effect of “assigning” a compound treatment
    • \(E[Y^{1}-Y^{0}]\)
  2. Weighted average of version-specific effects \(Y^{a,k^a}\)
    • \(\sum{E[Y^{a,k^a}|A=a, K^a(a)=k^a]}{Pr[K^a(a)=k^a|A=a]}\)
  3. Effect of assigning a random draw from versions \(K\)
    • From observed distribution among \(A=1\) vs \(A=0\)
      • & further conditioning on \(L=l\) if confounding was adjusted

Approach 3: Shifting The Target of Interventions

  • The effect of SES on mitigating the racial disparity (VanderWeele and Robinson 2014)
    • What is the remaining association between race and the outcome, after fixing SES?
    • Often viewed as an extension of mediation
      • But does not require the conceptualization of an effect for the “exposure”

Summary 3

  • Consistency assumption is often challenging for social exposures
    • Unclear actions, lack of transportability, ill-informed study design
  • In general, aim for well-defined & manipulable exposures
    • Imagine hypothetical interventions
    • (Perhaps less intuitive) interpretation available even when there are multiple versions
  • But ask fundamental questions: What are the spiders that are producing inequalities?
    • Cutting the “web of causation” isn’t sufficient
    • The closer we get to the spiders, the less well-defined?
      • What is the goal of your “causal analysis”? Effect estimation or explanation?

Assignment

  • Problem set #2 (due September 22 at 9:55am)
  • Reading quiz

References

Bertrand M, Mullainathan S. Are emily and greg more employable than lakisha and jamal? A field experiment on labor market discrimination. American economic review. 2004;94(4):991–1013.
Carey EG, Ridler I, Ford TJ, Stringaris A. Editorial perspective: When is a ‘small effect’actually large and impactful? Journal of child psychology and psychiatry. 2023;64(11):1643–7.
Galea S, Hernán MA. Win-win: Reconciling social epidemiology and causal inference. American journal of epidemiology. 2020;189(3):167–70.
Hernán MA, Robins JM. Using big data to emulate a target trial when a randomized trial is not available. American journal of epidemiology. 2016;183(8):758–64.
Jackson JW, Arah OA. Invited commentary: Making causal inference more social and (social) epidemiology more causal. American journal of epidemiology. 2020;189(3):179–82.
Krieger N. Epidemiology and the web of causation: Has anyone seen the spider? Social science & medicine. 1994;39(7):887–903.
Petersen ML, Laan MJ van der. Causal models and learning from data: Integrating causal modeling and statistical estimation. Epidemiology. 2014;25(3):418–26.
Robinson WR, Bailey ZD. Invited commentary: What social epidemiology brings to the table—reconciling social epidemiology and causal inference. American journal of epidemiology. 2020;189(3):171–4.
Rose G. Sick individuals and sick populations. International journal of epidemiology. 1985;14(1):32–8.
Rudolph KE, Williams NT, Miles CH, Antonelli J, Diaz I. All models are wrong, but which are useful? Comparing parametric and nonparametric estimation of causal effects in finite samples. Journal of Causal Inference. 2023;11(1):20230022.
Schuler MS, Rose S. Targeted maximum likelihood estimation for causal inference in observational studies. American journal of epidemiology. 2017;185(1):65–73.
Shiba K, Kawahara T. Using propensity scores for causal inference: Pitfalls and tips. Journal of epidemiology. 2021;31(8):457–63.
Smith MJ, Mansournia MA, Maringe C, Zivich PN, Cole SR, Leyrat C, et al. Introduction to computational causal inference using reproducible stata, r, and python code: A tutorial. Statistics in medicine. 2022;41(2):407–32.
VanderWeele TJ. Invited commentary: Counterfactuals in social epidemiology—thinking outside of “the box.” American Journal of Epidemiology. 2020;189(3):175–8.
VanderWeele TJ, Hernan MA. Causal inference under multiple versions of treatment. Journal of causal inference. 2013;1(1):1–20.
VanderWeele TJ, Robinson WR. On the causal interpretation of race in regressions adjusting for confounding and mediating variables. Epidemiology. 2014;25(4):473–84.