Tae Hyun Kim (Lowell)

Confounder

3분 읽기 #causal-inference#scm#dag

Definition

Confounder는 **treatment (X)와 outcome (Y) 모두에 영향을 주는 변수 (common cause)**로, X와 Y 사이에 spurious (non-causal) association을 생성.

DAG 표현:

    Confounder (Z)
       ↙        ↘
  Treatment (X)   Outcome (Y)

수학적 정의: 변수 ZZ가 confounder일 조건:

  1. ZZXX에 영향 (또는 XX와 연관)
  2. ZZYY에 영향 (또는 YY와 연관)
  3. ZZXX의 결과가 아님 (not on causal path)

Intuitive Understanding

핵심 아이디어:

Confounder는 “제3의 변수”로서, X와 Y가 직접적 인과관계 없이도 연관되어 보이게 만듦

예: 아이스크림 판매량(X)과 익사 사고(Y)의 상관관계

       여름 (Confounder)
          ↙        ↘
   아이스크림 판매    익사 사고
  • 아이스크림이 익사를 유발하는 것이 아님
  • 여름이라는 공통 원인이 둘 다에 영향
  • Spurious association: 인과가 아닌 상관

Back-door Path

Confounder는 back-door path를 생성:

X ← Z → Y
  • X에서 Y로 가는 “뒷문” 경로
  • 이 경로를 통해 non-causal association 전달
  • 차단 필요: Causal effect 식별을 위해

Confounding 조정 방법

1. Statistical Control

Stratification:

# Z의 각 level에서 X-Y 관계 분석
for z_level in Z.unique():
    subset = data[data['Z'] == z_level]
    analyze(subset['X'], subset['Y'])

Regression: Y=β0+β1X+β2Z+ϵY = \beta_0 + \beta_1 X + \beta_2 Z + \epsilon

β1\beta_1은 Z를 control한 후의 X의 효과.

Propensity Score: e(X)=P(X=1Z)e(X) = P(X=1|Z)

  • Propensity score로 matching 또는 weighting

2. Design-based Control

Randomization (RCT):

  • Treatment를 무작위 배정
  • Confounders가 treatment와 독립이 됨
  • Back-door path 자동 차단

Natural Experiments:

  • Instrumental Variables
  • Regression Discontinuity
  • Difference-in-Differences

3. Control by Design

Twin Studies:

  • Monozygotic twins: genes + family environment 공유
  • Within-pair analysis로 genetic confounding 제거

Adoption Studies:

  • Genetic link를 끊어 genetic confounding 제거

Measured vs Unmeasured Confounders

Measured Confounder

  • Data에서 관측 가능
  • Statistical control로 조정 가능
  • 예: 나이, 성별, 교육수준

Unmeasured Confounder

  • Data에서 관측 불가 (또는 측정 안 됨)
  • Causal effect 식별 불가능
  • Sensitivity analysis로 영향 평가
       Unmeasured U
          ↙        ↘
         X          Y
  • U를 measure하지 않으면 X→Y effect biased

Confounding vs Collider vs Mediator

변수 유형DAG 구조Control 여부
ConfounderX ← Z → YControl 해야 함
ColliderX → Z ← YControl 하면 안 됨
MediatorX → Z → Y목적에 따라 다름

Rule of thumb: Post-treatment variable은 control하지 말 것

Examples

Example 1: Education and Income

      Intelligence
       ↙        ↘
  Education  →  Income
  • Confounder: Intelligence
  • Spurious path: Education ← Intelligence → Income
  • Solution: Intelligence를 control

Example 2: Smoking and Lung Cancer (Historical)

      Genetics?
       ↙        ↘
    Smoking   Lung Cancer
  • Fisher의 주장: Genetics가 confounder일 수 있음
  • 후속 연구로 smoking의 causal effect 확립

Example 3: Maternal Affection and Child Depression

      Shared Genes
       ↙        ↘
  Maternal       Child
  Affection    Depression
  • Genetic confounding: 부모-자녀 간 유전자 공유
  • Solution: Adoption studies로 genetic link 제거

Measurement Error in Confounders

Confounder의 measurement error는 심각한 문제:

Z=Z+ϵZZ^* = Z + \epsilon_Z

  • ZZ를 정확히 측정하지 못하면 ZZ^*로 대체
  • Residual confounding: Z의 영향이 완전히 제거되지 않음
  • False positive rate: Large sample에서 100%에 근접 가능 (Westfall & Yarkoni, 2016)
  • DAG - Causal structure 시각화
  • Back-door Criterion - Confounding 조정 조건
  • Collider - Control하면 안 되는 변수
  • Mediator - Causal pathway 상의 변수
  • Propensity Score - Confounding 조정 방법
  • Unconfoundedness - No hidden confounders 가정

References

  • rohrerThinkingClearlyCorrelations - Confounding과 DAG
  • Pearl, J. (2009). Causality

연결 그래프