1 정의
- Eligibility criteria: 분석 대상 환자 정의.
- Treatment strategies: 비교할 처치 전략의 정확한 정의.
- Treatment assignment: 무작위 (target trial) vs 자기 선택 (관찰).
- Time zero (start of follow-up): 추적 시작 시점.
- Outcomes: Primary + secondary outcome 정의.
- Causal contrast: ITT, PP, ATE, ATT 등.
- Analysis plan: g-method, sensitivity, software 등.
- Adherence definition: 비순응의 명시적 기준.
- Eligibility met — 분석 대상 자격 충족 시점.
- Treatment assigned — 처치 결정 시점.
- Treatment initiated — 처치 시작 시점.
- Outcome 추적 시작 — Outcome 측정 시작.
4 가지가 동시 = 정의 명확. 다르면 immortal time bias 위험.
직관 — Time Zero 동시성의 의학적 의미: 환자가 처치 결정 후 즉시 추적 시작. 처치 받기 전 발생한 outcome 은 그 환자에게 해당 안 됨. 처치 결정 전 사망한 환자는 분석 제외. 이 원칙 위반 시 처치 그룹의 불공정 advantage.
2 22.3 Target Trial Emulation 절차
2.1 8 Components 의 명시 — NHEFS 사례
Target Trial: HIV+ 성인의 ART 시작 시점 비교.
1. Eligibility: - 18 세 이상. - HIV 양성, AIDS 미진단. - 이전 ART 미사용. - Baseline CD4, viral load 측정.
2. Treatment Strategies: - \(g_1\): “CD4 < 350 시 즉시 ART 시작 + 60 개월 지속”. - \(g_2\): “CD4 < 200 시 ART 시작 + 60 개월 지속”.
3. Assignment: 무작위 1:1 (target trial). Self-selection (관찰).
4. Time Zero: HIV 진단 후 첫 진료 (4 components 동시).
5. Outcomes: 60 개월 사망 (primary), AIDS 진행 (secondary).
6. Contrast: PP effect (대부분 의학 연구의 관심).
7. Analysis: IPW MSM with stabilization, bootstrap CI, sensitivity (E-value).
8. Adherence: 매 시점 ART 처방 + 환자 보고 복용 유지.
직관 — Protocol 작성의 가치: 분석 시작 전 의사결정 명시. 분석 결과에 따라 protocol 변경 금지 (HARKing 회피). Pre-registration 의 인과 분석 형태.
2.2 관찰 데이터의 align
각 component 를 관찰 데이터에 어떻게 align?
1. Eligibility: 데이터에서 baseline 시점에 eligibility met 환자 선택. 2. Strategies: 처치 history 패턴으로 정의 (e.g., “CD4 < 350 시 ART 시작”). 3. Assignment: 관측된 처치 패턴 사용 (배정 미관측). 개별 환자가 어떤 strategy 따랐는지 분류. 4. Time Zero: Eligibility met 시점 = Time Zero. 이 시점부터 추적. 5. Outcomes: 추적 기간 동안의 outcome 측정. 6. Contrast: Per-Protocol effect (ITT 추정 어려움). 7. Analysis: G-method 적용. 8. Adherence: 처치 history 의 strategy 일치 여부.
핵심: Eligibility met = Time Zero 의 동시성 보장.
직관 — 관찰 분석의 alignment 작업: 데이터의 각 환자에 대해 어느 시점에 eligibility met 결정. 그 시점이 time zero. 그 이후 추적. Retrospective 데이터에서도 prospective 형식 유지.
직관 — Sequential Trial Emulation: 매일 (또는 매 진료 시점) eligibility 체크 → 그 환자가 그 시점에 새 trial 의 baseline 으로. 한 환자가 여러 trial 의 baseline 으로 등장 가능. 각 trial 이 독립 + 결과 통합.
2.3 Multiple Trial Emulation Approach
관찰 데이터에서: - 환자 1: 2010-01-01 eligibility met → time zero 1. - 환자 1: 2010-04-01 eligibility 다시 met → time zero 2 (다른 trial). - 환자 2: 2010-02-15 eligibility met → time zero 1 (자기만의 trial).
각 trial 의 emulation: - 자체 baseline. - 자체 5 년 추적. - 자체 strategy 분류.
→ 한 환자가 여러 trial 의 baseline + 여러 trial 의 follow-up 에 동시 존재 가능.
→ 결과 통합: 각 trial 의 PP effect 의 평균. Robust standard error 또는 bootstrap.
직관 — Multiple Trial 의 강점: 한 시점만 baseline 으로 사용 시 데이터 손실 큼. Sequential emulation 으로 모든 가능한 baseline 활용. Statistical efficiency 향상.
직관 — Sequential Trial 의 함정: 한 환자가 여러 trial 에 등장 → correlated observations. Cluster-robust SE 또는 bootstrap (cluster level) 필수.
3 22.4 Time Zero 와 Immortal Time Bias
3.1 Immortal Time Bias 의 정확한 메커니즘
1980 년대 의학 분석: - “이식 받은 환자 vs 안 받은 환자” 사망률 비교. - 이식 그룹의 생존율 훨씬 높음. - “이식이 효과 있다” 잘못된 결론.
진짜 메커니즘: - 이식 받으려면 대기 명단까지 살아 있어야 함. - 대기 중 사망한 환자 = 자동 비이식 그룹. - 이식 그룹의 immortal time (대기 중 살아 있던 시간) 이 분석에 포함.
결과: 이식 그룹이 더 긴 생존시간 — 처치 효과가 아닌 생존 selection.
Target Trial 적용: - Time zero = 처치 결정 시점 (대기 명단 등록). - 등록 후 사망 = 이식 안 받은 환자, but 그 시점부터 추적 시작. - → 두 그룹의 equal opportunity 보장. - → Immortal time bias 자동 회피.
직관 — “면역 시간” 의 실체: 처치 그룹의 처치까지 살아 있는 시간이 처치 효과로 잘못 귀속. 그 시간 동안 환자는 어떤 처치도 받지 않은 것 = 진짜 비처치 시간. 이 시간을 비처치 그룹에 할당 해야 정확.
직관 — Statin 의 사례: Statin 사용자 vs 비사용자의 사망률. 사용자 그룹의 처방 받기 전 살아 있던 시간이 사용자에 잘못 귀속. 1990 년대 흔한 함정. Target trial framework 도입 후 해결.
3.2 Time Zero 정의의 흔한 오류
오류 1: Eligibility met 후 처치 결정 지연: - 진단 시점부터 처치 결정까지 gap 존재. - Gap 동안 사망한 환자 자동 비처치 그룹. - → Immortal time bias.
오류 2: 처치 후 outcome 추적 시작: - 처치 받은 환자만 추적 시작. - 처치 안 받은 환자의 추적 시작 시점 모호. - → Selection on treatment.
오류 3: Outcome 정의 시점 vs Eligibility 시점 misalignment: - 진단 (eligibility) 시점은 명확하지만 outcome 측정 (e.g., 5 년 사망) 시점이 환자별로 다름. - → Differential follow-up 시간.
오류 4: 시간 의존 처치의 baseline 처리: - Baseline 에 처치 받은 환자 = 처치 그룹. - Baseline 후 처치 시작 환자 = ???. - → New-user vs prevalent-user 혼동.
직관 — Hernán 의 강조: “거의 모든 인과 분석의 bad analysis 가 time zero 의 misalignment 에서 출발.” Target trial framework 의 eligibility = time zero = treatment assignment 동시성 원칙이 이 함정 회피.
직관 — Real-world Evidence (RWE) 의 도전: EHR (Electronic Health Records) 데이터에서 time zero 정의 가장 어려움. Retrospective + 시간 의존 처치 + 다양한 진료 시점. 분석가의 명시적 protocol 작성이 필수.
3.3 Statin Trial Emulation 의 사례
Goal: Statin 의 심혈관 사망 예방 효과.
Bad Analysis (당시 표준): - “Statin 사용자 vs 비사용자” 사망률 비교. - 사용자 그룹: 진단 후 어느 시점부터 statin 시작. - → Immortal time bias + prevalent user bias.
Target Trial Emulation (Hernán et al.): - Eligibility: 새로 statin 처방 가능한 환자. - Time Zero: Statin 처방 결정 시점. - Strategies: \(g_1\) (statin 시작 + 5 년 지속), \(g_0\) (statin 안 받음). - IPW MSM 분석.
결과: Bad analysis 가 해롭다 결론, Target Trial 분석이 효과 있다 정확한 결론.
→ Target Trial framework 의 기념비적 응용.
직관 — Framework 의 의학적 영향: 1990-2000 년대 statin 분석 위기 — 해롭다 결과로 처방 변경 위협. Target Trial framework 의 Hernán et al. (2008) 분석이 진짜 효과 (예방) 확인. 인과 분석의 의학적 가치를 입증한 사례.
직관 — Big Data 의 함정: EHR, claims data 의 큰 data 가 자동으로 정확한 답 주지 않음. Naive 분석 = bias 증폭. Target Trial framework 가 big data 의 체계적 활용 가능하게.
4 시간변동 처치의 Emulation 복잡성
Static strategy (e.g., “Always treat”): - 매 시점 처치 받은 환자 = 순응자. - 한 시점이라도 처치 안 받으면 비순응 → 데이터 손실.
Dynamic strategy (e.g., “CD4 < 200 시 처치”): - 매 시점 strategy 의 조건 평가. - 환자의 처치 결정이 strategy 와 일치 여부. - 일치 안 하면 비순응.
→ Strategy 정의가 세밀할수록 비순응 환자 많음.
→ G-method 의 가상 시뮬레이션 으로 비순응 환자 데이터 활용. 단순 PP population 분석은 손실 큼.
직관 — Strategy Definition 의 trade-off: 너무 strict (e.g., “정확히 매일 약 복용”) = 모든 환자 비순응. 너무 loose (e.g., “한 번이라도 약 받음”) = 의미 없음. 임상적으로 합리적 strategy 정의 가 분석의 첫 단계.
직관 — G-method 의 결정적 가치: 비순응 환자도 가상 시뮬레이션 에서 활용. “만약 이 환자 가 strategy 따랐다면” 의 가상 결과. 데이터 손실 회피 + 통계적 효율.
5 Target Trial Framework 의 21 세기 영향
의학 저널 표준: NEJM, Lancet, JAMA 등 의학 저널이 target trial framework 권장.
규제 기관 채택: FDA, EMA 의 Real-World Evidence 가이드라인이 framework 따름.
Reporting 표준: RECORD-PE (Routinely-collected health data RECord OPENED for PE), STROBE-RECORD 등.
교육 표준: Hernan 의 Harvard Causal Inference course, 의학 통계학 교재의 표준 도구.
Software 발전: gfoRmula R package, doubly robust ML 패키지의 target trial 지원.
직관 — 인과 분석 표준화의 정점: 30+ 년 발전의 통합. Robins 의 g-method (1986) + Hernán & Robins (2016) framework + ML 결합 (2018+). 2020 년대 인과 분석의 표준 frame.
직관 — 향후 발전: ML + target trial emulation 의 결합. EHR 데이터의 대규모 sequential trial emulation. 의학 AI agent 의 인과 분석 도구로. 21 세기 인과 분석의 다음 발전.
6 NHEFS 사례 — Target Trial Emulation 정밀 분석
NHEFS Ch.12-15 분석을 target trial framework 로 명시:
Bad Analysis: - “1971 년 흡연자 → 1982 년 금연 여부” 단순 비교. - Eligibility, time zero 모호.
Target Trial 명시: - Eligibility: 1971-75 baseline 25-74 세 흡연자. - Time Zero: 1971-75 baseline visit. - Strategies: \(g_1\) = 1982 까지 sustained quit, \(g_0\) = 1982 까지 continue smoke. - Outcome: 1982 체중 변화. - Causal Contrast: PP effect (single time point 라 ITT/PP 동일). - Analysis: IPW MSM, g-formula.
Hidden Issue (Fine Point 12.1): - 1971-75 시점의 baseline 흡연자 → 1982 까지 살아 있어야 분석 포함. - 사망 환자 자동 분석 제외 → selection bias 가능. - 정확한 target trial: baseline 흡연자 + 1982 까지 추적. - NHEFS 는 부분적 emulation.
→ Hernan 의 Fine Point 12.1 에서 명시적 인정.
직관 — NHEFS 의 한계 인식: Hernan 본인이 NHEFS 가 완벽한 target trial emulation 아님 인정. 교육 목적으로 단순화. 진짜 응용은 더 정밀한 framework 적용. 책의 정직한 frame.
7 응용 분야
- Comparative Effectiveness Research (CER): EHR 데이터의 약물 비교 효과
- Real-World Evidence (RWE): 규제 기관 의약품 승인의 보조 evidence
- Healthcare Quality Improvement: 정책 효과의 인과 분석
- Public Health Policy Evaluation: 백신 효과, 사회적 거리두기 효과 등
- Pharmacoepidemiology: 약물 안전성 + 효과의 long-term 분석
8 코드 — Target Trial Protocol Document Generator
# === Target Trial Protocol Generator ===
def create_target_trial_protocol(
research_question: str,
eligibility: dict,
strategies: dict,
time_zero: str,
outcomes: dict,
contrast: str,
analysis_plan: dict,
adherence: str,
):
"""Target Trial Protocol Document 작성 도구"""
protocol = {
"Research Question": research_question,
"1. Eligibility Criteria": eligibility,
"2. Treatment Strategies": strategies,
"3. Treatment Assignment": "Random (target); Observed (emulation)",
"4. Time Zero": time_zero,
"5. Outcomes": outcomes,
"6. Causal Contrast": contrast,
"7. Analysis Plan": analysis_plan,
"8. Adherence Definition": adherence,
}
return protocol
# === NHEFS 의 Target Trial ===
nhefs_protocol = create_target_trial_protocol(
research_question="흡연 중단이 10년 체중 변화에 미치는 평균 인과 효과",
eligibility={
"criteria": "1971-75 baseline cigarette smokers (cigarettes/day > 0)",
"age": "25-74 years",
"data_completeness": "9 baseline covariates measured"
},
strategies={
"g1": "Quit smoking by 1982 (sustained quit)",
"g0": "Continue smoking through 1982"
},
time_zero="1971-75 baseline visit",
outcomes={
"primary": "Weight change kg (1982 - baseline)",
"secondary": "Sustained quit indicator"
},
contrast="Per-Protocol ATE (single time point)",
analysis_plan={
"primary_method": "IPW MSM with stabilization",
"secondary_method": "Parametric g-formula",
"doubly_robust": "AIPW",
"covariates": "9 baseline (sex, age, race, education, smoke intensity, "
"smoke years, exercise, active, baseline weight)",
"sensitivity": "E-value, multiple specifications"
},
adherence="Sustained quit/smoke 1971-75 to 1982"
)
import json
print("=== NHEFS Target Trial Protocol ===")
print(json.dumps(nhefs_protocol, indent=2, ensure_ascii=False))
# === Statin Target Trial Emulation (Hernán et al. 2008 inspiration) ===
statin_protocol = create_target_trial_protocol(
research_question="Statin 의 5 년 심혈관 사망 예방 효과",
eligibility={
"criteria": "Statin-naive adults age 50-80",
"exclusion": "Existing CVD, contraindications to statin"
},
strategies={
"g1": "Initiate statin + sustained 5-year use (with allowance for "
"discontinuation due to side effects)",
"g0": "No statin for 5 years"
},
time_zero="First eligible clinic visit (eligibility met = time zero)",
outcomes={
"primary": "5-year cardiovascular mortality",
"secondary": "All-cause mortality, MI"
},
contrast="Per-Protocol effect with sustained adherence",
analysis_plan={
"method": "IPW MSM, sequentially emulated trials",
"covariates": "Age, sex, baseline lipids, comorbidities",
"censoring": "Time-varying IPW for loss to follow-up"
},
adherence="Continuous statin prescription + dispensing records"
)
print("\n=== Statin Target Trial Protocol ===")
print(json.dumps(statin_protocol, indent=2, ensure_ascii=False))9 한 줄 요약
Target Trial Emulation 의 8 components 명시 — eligibility, strategies, assignment, time zero, outcomes, contrast, analysis, adherence. Time zero 의 4 가지 동시성 (eligibility, assignment, initiation, follow-up) 이 immortal time bias 회피의 핵심. Multiple Trial Emulation 으로 한 환자가 여러 trial 의 baseline — sequential trial framework. Hernán et al. (2008) 의 statin 사례가 framework 의 기념비적 적용 (bad analysis 의 해롭다 → 정확한 효과 있음). 의학 저널· 규제 기관·교육 표준의 21 세기 인과 분석 lingua franca.
10 관련 주제
선행 지식
후속 주제
다른 카테고리 연결