앞의 네 편은 추정량을 다뤘습니다. 이 편이 다루는 건 분석의 품질을 실제로 결정하는 부분, 그러니까 추정량을 고르기 전에 내리는 결정들의 순서입니다.
The previous four posts covered estimators. This one covers the part that actually decides whether an analysis is any good: the sequence of decisions made before an estimator is chosen.
실패한 인과분석은 대개 추정 단계에서 실패하지 않습니다. 질문이 정밀해진 적이 없거나 인과 구조를 그려 본 적이 없어서 실패합니다. 가정이 성립해서가 아니라 익숙해서 설계를 골랐기 때문에 실패하기도 합니다. 매칭과 IV 사이에서 고민하는 시점이면 피해는 이미 생겼거나 이미 피한 뒤입니다.
Most failed causal analyses do not fail at estimation. They fail because the question was never made precise, or the causal structure was never drawn, or a design was picked because it was familiar rather than because its assumptions held. By the time you are choosing between matching and IV, most of the damage is already done or already avoided.
아래는 여덟 단계 틀입니다. 지면에서는 일부러 선형이지만 실제로는 반복적입니다. 5단계가 3단계로 돌려보내는 일이 예사입니다. 4단계에서 발견한 데이터 한계가 3단계에서 고른 전략을 무효화하기도 합니다. 한 번 돌리는 파이프라인으로 읽지 마시고 반드시 정리되어야 할 것들의 체크리스트로 보십시오.
What follows is an eight-step framework. It is deliberately linear on the page and iterative in reality — step 5 routinely sends you back to step 3, and a data limitation discovered in step 4 can invalidate the strategy chosen in step 3. Treat it as a checklist of things that must be settled, not a pipeline to run once.
방법이 아니라 틀이 필요한 이유Why a framework rather than a method
이름 붙일 만큼 자주 반복되는 실패 양상이 셋 있습니다. 각각이 아래 단계에 대응합니다.
Three failure modes recur often enough to be worth naming, and each maps to a step below.
- 답할 수 없는 질문. "우리 마케팅이 효과가 있나요?"는 처치도, 모집단도, 결과도, 비교 대상도 특정하지 않아서 답할 수 없습니다. 1·2단계는 이런 질문을 답이 있는 질문으로 바꾸라고 있습니다.
- 가정으로 없앤 교란변수. 데이터셋에 마침 있던 것들을 통제하고 계수를 인과적인 것처럼 보고하는 분석입니다. 2단계 — 어떤 데이터가 있는지 보기 전에 인과 모형을 그리기 — 가 방어책입니다. 측정할 수 있는지와 무관하게 교란변수를 열거하도록 강제하기 때문입니다.
- 문제를 찾아다니는 방법. 지난번에 쓴 기법에 손이 가는 것입니다. 3단계는 설계 선택이 문제의 구조와 실제로 방어할 수 있는 가정에서 따라 나오게 하려고 있습니다.
- The unanswerable question. "Does our marketing work?" cannot be answered because it specifies no treatment, population, outcome or comparison. Steps 1 and 2 exist to convert such questions into ones that have answers.
- The assumed-away confounder. An analysis that controls for whatever happened to be in the dataset, then reports a coefficient as if it were causal. Step 2 — drawing the causal model before looking at what data exists — is the defence, because it forces you to enumerate confounders independently of whether you can measure them.
- The method in search of a problem. Reaching for the technique you used last time. Step 3 exists to make the choice of design follow from the structure of the problem and the assumptions you can actually defend.
가장 중요한 습관 하나The single most important habit
방향성 비순환 그래프는 무엇이 무엇을 일으킨다고 믿는지를 그린 그림입니다. 거기 담긴 규칙들은 직관적이지 않습니다. 그래서 그림을 그릴 값어치가 있습니다.
A directed acyclic graph is a picture of what you believe causes what. The rules it encodes are not intuitive, which is exactly why the picture is worth drawing.
| 변수 유형 | 정의 | 통제할 것인가 |
|---|---|---|
| 교란변수 | 처치와 결과의 공통 원인 | 반드시 통제. 익숙한 경우입니다. |
| 매개변수 | 처치에서 결과로 가는 경로 위에 있음 | 절대 안 됨. 재려는 효과의 일부를 제거합니다. |
| 충돌부 | 두 변수의 공통 결과 | 절대 안 됨. 없던 연관을 만들어 냅니다. |
| Variable type | Definition | Control for it? |
|---|---|---|
| Confounder | Common cause of treatment and outcome | Yes. This is the familiar case. |
| Mediator | On the causal path from treatment to outcome | No. It removes part of the effect you want to measure. |
| Collider | Common effect of two variables | No. Conditioning on it creates a spurious association. |
충돌부가 반직관적인 쪽입니다. 선택편의와 Berkson의 역설, 그리고 출판된 헛소리의 상당 부분 뒤에 있는 기제이기도 합니다. 실무적 함의는 이렇습니다. "가능한 모든 것을 통제한다"는 보수적인 기본값이 아닙니다. 편향을 없애는 대신 만들어 낼 수도 있는 능동적 선택입니다. 어떤 변수를 넣을지는 인과 구조를 묻는 질문입니다. DAG는 그 구조를 적어 두는 곳입니다.
Colliders are the counterintuitive one, and the mechanism behind selection bias, Berkson paradox, and a good share of published nonsense. The practical upshot: "control for everything available" is not a conservative default. It is an active choice that can introduce bias rather than remove it. Which variables to include is a question about causal structure, and the DAG is where that structure gets written down.
import numpy as np
import statsmodels.api as sm
rng = np.random.default_rng(2)
n = 20_000
# D -> Y, and both cause C. C is a COLLIDER, not a confounder.
d = rng.normal(size=n)
y = 0.0 * d + rng.normal(size=n) # true effect is exactly zero
c = d + y + rng.normal(size=n) # common effect of both
plain = sm.OLS(y, sm.add_constant(d)).fit()
collider = sm.OLS(y, sm.add_constant(np.column_stack([d, c]))).fit()
print(f"true effect : 0.000")
print(f"no controls : {plain.params[1]:+.3f}")
print(f"controlling for collider C: {collider.params[1]:+.3f}")true effect : 0.000
no controls : +0.004
controlling for collider C: -0.501
통제하지 않으면 참값인 0을 얻습니다. 충돌부를 하나 통제하면 강한 음의 효과를 얻습니다. 존재하지 않는 효과입니다. 어떤 진단도 이걸 알려 주지 않습니다. DAG만 알려 줍니다.
Without controls you get the truth, zero. Add one collider and you get a strong negative effect that does not exist. No diagnostic flags it. Only the DAG does.
추정 대상이 추정량보다 먼저The estimand comes before the estimator
1단계가 어떤 숫자를 원하는지 구체적으로 말하라고 요구하는 이유는 다시 짚어 둘 값어치가 있습니다. ATE·ATT·ATC는 효과가 이질적이면 갈라집니다. 서로 다른 비즈니스 질문에 답하기 때문입니다.
Step 1 asks you to be specific about what number you want, and it is worth restating why. ATE, ATT and ATC differ whenever effects are heterogeneous, and they answer different business questions.
- 이 프로그램을 아직 참여하지 않은 사람들에게 확대해야 하는가 → ATC 질문입니다.
- 이 프로그램은 참여한 사람들에게 값어치가 있었는가 → ATT입니다.
- 이것이 보편적으로 시행되면 어떻게 되는가 → ATE입니다.
- Should we expand this programme to people not currently in it? That is an ATC question.
- Was running this worth it for the people who took it? ATT.
- What if this became universal? ATE.
IV 설계는 순응자에 대한 LATE를 줍니다. RD는 문턱에서의 효과를 줍니다. 결함이 아닙니다. 설계가 추정 대상을 부분적으로 결정한다는 뜻입니다. 그러니 필요한 추정 대상이 어느 설계를 고를지에 정보를 줘야 합니다. 나중에 발견될 일이 아닙니다.
An IV design gives you a LATE for compliers. An RD gives an effect at the cutoff. These are not defects, but they mean the design partly determines the estimand — so the estimand you need should inform which design you choose, not be discovered afterwards.
실제로 돌아가게 만들기Making it operational
- 시작하기 전에 영(null) 결과를 적어 두십시오. 추정치가 0으로 나오면 무엇을 결론짓고 무엇을 할 것인지 미리 정하십시오. 답이 "어차피 시행한다"면 그 분석은 의사결정과 무관하고 노력은 다른 데 써야 합니다. 들어오는 요청을 분류하는 가장 빠른 방법입니다.
- 가정을 통계 언어가 아니라 도메인 언어로 진술하십시오. "X를 조건으로 비교란성이 성립한다"는 비즈니스 상대에게 아무 의미가 없고 솔직히 논증을 가립니다. "근속·교대·이전 성과가 같은 직원들 사이에서는 누가 교육에 뽑혔는지가 사실상 임의였다고 가정합니다"는 현장을 아는 사람이 반박할 수 있는 주장입니다. 그 반박을 받는 것이 요점입니다.
- 내부적으로 사전등록하십시오. 설정·표본·결과·분석 계획을 아무것도 돌리기 전에 적어 두십시오. 한 시간이면 되고 추정치와 탐색의 차이를 만듭니다. 이 시리즈의 엿보기 편이 그것 없이 무슨 일이 생기는지 다룬 이야기입니다.
- 점이 아니라 범위를 보고하십시오. 표준오차가 붙은 숫자 하나는 불확실성을 과소진술합니다. 표준오차는 표집 변동만 반영하고 설정 선택도, 식별 가정도 반영하지 않기 때문입니다. 합리적인 여러 설정에서 나온 추정치를 보이십시오. 일치하면 진짜 강건성의 증거입니다. 어긋나면 독자가 알 자격이 있습니다.
- 가정이 얼마나 틀려야 하는지 수량화하십시오. 민감도 분석 — Rosenbaum 경계, E-value, Cinelli–Hazlett — 은 검정 불가능한 가정을 독자가 평가할 수 있는 진술로 바꿉니다. "이 결과를 뒤집으려면 근속만큼 강한 미관측 교란변수가 필요합니다." 가정이 성립한다고 주장하는 것보다 훨씬 쓸모 있습니다.
- 이 추정치가 누구에게 해당하는지 말하십시오. 자르거나 매칭하거나 IV 설계를 쓴 뒤에는 그 숫자 뒤의 모집단이 원래 질문의 모집단인 경우가 드뭅니다. 이걸 명시하는 건 기본적인 정직의 문제입니다. 추정치가 엉뚱한 곳에 적용되는 것도 막습니다.
- Write the null result before you start. Decide in advance what you would conclude if the estimate came back at zero, and what you would do about it. If the answer is "we would run it anyway", the analysis is not decision-relevant and the effort belongs elsewhere. The fastest way to triage incoming requests.
- State the assumption in the language of the domain, not statistics. "Unconfoundedness holds conditional on X" means nothing to a business stakeholder and obscures the argument. "We are assuming that among associates with the same tenure, shift and prior performance, who got selected was effectively arbitrary" is a claim someone with operational knowledge can push back on. Getting that pushback is the point.
- Pre-register internally. Write down the specification, sample, outcome and analysis plan before running anything. It costs an hour and it is the difference between an estimate and a search. The peeking post in this series is about what happens without it.
- Report a range, not a point. A single number with a standard error understates uncertainty, because the standard error reflects only sampling variation — not specification choices, not the identifying assumption. Show the estimate under several reasonable specifications. If they agree, that is genuine evidence of robustness. If they disagree, the reader deserves to know.
- Quantify how wrong the assumption would have to be. Sensitivity analysis — Rosenbaum bounds, E-values, Cinelli-Hazlett — converts an untestable assumption into a statement a reader can evaluate: "an unobserved confounder would need to be as strong as tenure to overturn this." Far more useful than asserting the assumption holds.
- Say who the estimate applies to. After trimming, matching or an IV design, the population behind the number is rarely the population in the original question. Making that explicit is basic honesty and prevents the estimate being applied where it does not belong.
경계해야 할 실패 양상The failure mode to watch for
이 시리즈의 잘못 설정된 모형 편이 가장 깨끗한 시연입니다. R² 0.76, t값 11 이상, 깨끗한 잔차 진단, 그리고 참값에서 27% 벗어난 추정치. 출력의 모든 진단이 건강했습니다. 그것을 잡을 수 있는 길은 하나뿐이었습니다. 추정량이 무엇을 요구하는지 알고 그것을 직접 확인하는 일이었습니다.
The misspecification post is the cleanest demonstration: R² of 0.76, t-statistics above 11, clean residual diagnostics, and an estimate 27% away from the truth. Every diagnostic in the output was healthy. The only thing that would have caught it was knowing what the estimator required and checking that directly.
이 틀이 그것을 위해 있습니다. 추정량은 쉬운 부분입니다. 다음 편은 이 여덟 단계를 구체적인 질문 하나에 처음부터 끝까지 적용합니다.
That is what this framework is for. The estimators are the easy part. The next post applies these eight steps end to end to one concrete question.