counterfactuals and psm

103
資資資資資資資資資資資 資資資資資資資資資資資資 因因因因因因因 : 因因因因因因因 資資資 資資資資資資資資 2010.01.16 A New Paradigm for Causal In ference: The Counterfactual Framework

Upload: pplgz

Post on 22-Nov-2014

130 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Counterfactuals and PSM

資料庫研究與統計方法學

大型資料庫研究主題工作坊

因果推論新思維 :反事實分析架構

關秉寅政治大學社會學系

2010.01.16

A New Paradigm for Causal Inference: The Counterfactual Framework

Page 2: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

因果推論:從古到今

•參考 Judea Pearl ( professor of Computer Science and Statistics and director of the Cognitive Systems Laboratory , UCLA )

•http://singapore.cs.ucla.edu/LECTURE/lecture_sec1.htm

Page 3: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

因果推論:從古到今•從亞當與夏娃說起:亞當與夏娃吃過智慧樹的果子後,他們已經是因果解釋的專家。當上帝問亞當你是否吃了智慧樹的果子時(詢問事實),亞當的回答是:「祢給我的那個女人,從樹上拿了果子讓我吃了」(不只是說明事實,還做了解釋);上帝問夏娃,夏娃回答是:「我是吃了,可是是蛇誘惑和欺騙了我」。

Page 4: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

因果推論:從古到今•聖經故事的意涵:

▫因果解釋是一個 man-made concept 。▫因果解釋是拿來歸咎責任的。▫只有神(為了某些目的)、人與動物(有自有意志)可以讓事情發生,而不是東西( objects )或物理的過程( physical processes )。

Page 5: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

因果推論:從古到今•但當工程師開始建造有許多滑輪及繩纜的 syst

em 來幫人做事後, physical objects 開始有了因果的特性。當系統無法運作時,歸咎於神或人並沒有用,比較有效的解釋是滑輪或繩纜壞了,只要加以替換後,系統就可再運作。

•至此, causes 之概念有雙重意義:▫the targets of credit and blame ▫the carriers of physical flow of control on the ot

her

Page 6: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

因果推論:從古到今•至文藝復興時,當上帝做為 final cause 逐漸被人的科學知識所取代時,這雙重意義遇到困難與挑戰。

•Galileo 在 1638 年出版 Discorsi (兩門新科學的對話)這本書後,有了革命性的轉變。此書有兩項重要的格言( maxims ):

Page 7: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

因果推論:從古到今▫1. 先描述,後解釋 ( Description first, expla

nation second ) : The how precedes the why. Ask not, said Galileo, whether an object falls because it is pulled from below or pushed from above. Ask how well you can predict the time it takes for the object to travel a certain distance, and how that time will vary from object to object, and as the angle of the track changes.

▫2. 以數學(方程式)來描述,而不是語言:如 d=t2 。

Page 8: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

因果推論:從古到今•從此,物理學充滿了有用但未被解釋的經驗法則,如 Snell law, Hooke’s law, Ohm’s law, Joule’s law 。

•另一項比預測實驗結果更重要的是代數方程式的運用,因為工程師除了可以問“ how to” 外,還可以問 “ what if” 。

Page 9: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

因果推論:從古到今•至啟蒙時代, David Hume 將 Galileo 的第一項格言發揮至極致,他認為 the WHY is not merely second to the HOW, but that the WHY is totally superfluous as it is subsumed by the HOW 。

•On page 156 of Treatise of Human Nature: "Thus we remember to have seen that species of object

we call FLAME, and to have felt that species of sensation we call HEAT. We likewise call to mind their constant conjunction in all past instances. Without any farther ceremony, we call the one CAUSE and the other EFFECT, and infer the existence of the one from that of the other."

Page 10: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

因果推論:從古到今•從實證主義的角度來看, Hume 是在說 “ A ca

used B” 與 “ Whenever A occurs, then B does” 相同。但是我們都知道雞啼是伴隨著朝陽,但雞啼並不是讓太陽出來的原因。

•大難題 1 :如果如 Hume 所說,我們的知識是來自於經驗,而經驗是以相關的形式存於我們的心靈中,那我們如何得到因果方面的知識?▫If regularity of succession is not sufficient

; what WOULD be sufficient?

Page 11: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

因果推論:從古到今•大難題 2 :我們知道某些關連有或沒有因果間的關係,有何差別嗎?知道因果又有何用?▫當然知道因果關係,就可以做某些事。如果雞啼是造成太陽升起的原因,那我們要縮短夜晚的話,就可以讓雞早些啼。

▫If causal information has an empirical meaning beyond regularity of succession, then that information should show up in the laws of physics. But it does not!

Page 12: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

因果推論:從古到今•Russell ( 1913 )認為 “ All philosophers i

magine that causation is one of the fundamental axioms of science, yet oddly enough, in advanced sciences, the word 'cause' never occurs ... The law of causality, I believe, is a relic of bygone age, surviving, like the monarchy, only because it is erroneously supposed to do no harm ...”

•“It could not possibly be an abbreviation, because the laws of physics are all symmetrical, going both ways, while causal relations are uni-directional, going from cause to effect.”

Page 13: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

因果推論:從古到今

•但另一位科學哲學家 Patrick Suppes 則指出 “There is scarcely an issue of Physical Review that does not contain at least one article using either ‘cause’ or ‘causality’ in its title.”

•物理學家一方面寫無因果意涵的方程式,但另一方面卻大談因果關係。

•統計學一百多年前發現相關( correlation )的概念後,卻無法忽略相關與因果間的區辨。

Page 14: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

因果推論:從古到今•Francis Galton 於 1888 年進行個人的前臂與其頭大小關係的測量,企圖瞭解一個數值預測另一個數值的程度時,發現到:▫ If you plot one quantity against the other and scal

e the two axes properly, then the slope of the best-fit line has some nice mathematical properties: The slope is 1 only when one quantity can predict the other precisely; it is zero whenever the prediction is no better than a random guess and, most remarkably, the slope is the same no matter if you plot X against Y or Y against X. "

•我們開始可以根據資料客觀的測量兩個變項間的關係,而不是根據我們的意見或判斷。

Page 15: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

因果推論:從古到今•Galton 的發現震撼了其學生 Karl Pearson (公認是現代統計學之父),使他終其一生認為我們只需要「相關」這個更廣泛的概念,而不需要另一個獨立的因果關係的概念。他也從不在其論文內提到因果的概念。

•這一直要到 Sir Ronald Fisher 建立 randomized experiment 的研究設計後,才成為唯一被主流統計學所接受,並認為這是唯一可從資料驗證因果間關係的科學方法。

•但這種謹慎的看法使得無法做實驗,而需靠統計分析為引導的社會科學處於近乎癱瘓的狀態。

Page 16: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

因果推論的新典範•Pearl 認為這樣的困境是源自統計學的官方語言:機率的語言。因為 cause 並不是機率的字彙。我們無法以機率的語言表達: Mud does not cause rain 。我們只能說兩者相關。

•Naturally, if we lack a language to express a certain concept explicitly, we can't expect to develop scientific activity around that concept.

•Scientific development requires that knowledge be transferred reliably from one study to another and, as Galileo has shown 350 years ago, such transference requires the precision and computational benefits of a formal language.

Page 17: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

因果推論的新典範•當研究者開始企圖使用電腦來建立因果關係時,對於先前兩大難題有了新的想法。

•從概念層次來說,機器人所遇到的問題是與經濟學家企圖建立稅收及預算模式,或流行病學家企圖建立流行病的模式是一樣的。不論是機器人、經濟學家或流行病學家都需要在行動受限制的條件下,依據充滿雜音的資訊,從環境中找出因果的關係。這就是先前的第一個大難題 : HOW?

Page 18: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

因果推論的新典範•機器人的世界也與第二大難題有關。如果我們教導機器人關於因果的知識,機器人要如何組織及運用這些知識呢?

•對機器人而言,這兩大難題是具體而實際的問題,就是如何從與環境的互動中得到因果的知識,以及如何運用從創造者 /程式設計師得到的因果知識?

Page 19: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

新典範與新語言• J. Pearl 的答案:第二個難題可以結合 graphs 與 equa

tions 的方式解決,如此則第一個難題也比較容易解決。解題的主要關鍵概念是:▫(1) treating causation as a summary of behavi

or under interventions.▫(2) using equations and graphs as a mathema

tical language within which causal thoughts can be represented and manipulated.

▫(3) Treating interventions as a surgery over equations.

Page 20: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

新典範與新語言

•社會科學家過去 75 年來不時使用 graphs ,如 structural equations modeling 及 path diagrams。但是由於代數方程式的便利性,因而壓抑了圖型的使用,也進而失去了圖型帶來的好處。

•這些 diagrams 事實上捕捉了因果的本質─預測不正常情況或是新的操弄狀態下,會產生什麼結果。

•這種預測是代數或相關分析無法做到的。

Page 21: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

新典範與新語言

Page 22: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

新典範與新語言

•從這樣的角度來看因果關係,可以理解為何科學家如此熱衷於因果解釋,因為建立因果模式會得到一種 “ deep understanding” 及 “ being in control” 的感覺。

•Deep understanding 的意思是 “ knowing, not merely how things behaved yesterday, but also how things will behave under new hypothetical circumstances, control being one such circumstance”.

Page 23: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

新典範與新語言•即使我們無法實際上控制事情,我們也因理解因果關係而得到 “ in control” 的感覺。例如,我們無法控制星體的運轉,但萬有引力的理論,讓我們能夠理解並獲得假設性控制( hypothetical control )的感覺。

•我們也可以預測當萬有引力改變時,對潮汐會產生什麼影響。

•因果模式也是做為區辨有意識的論證( deliberate reasoning )及被動或本能的反應( reactive or instinctive response )的試金石。前者可在即使不真正去從事新的操弄( manipulation )下,也可以預期新的操弄可以得到什麼結果。

Page 24: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

新典範與新語言•Equations vs. Diagrams (J. Pearl)

Page 25: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

新典範與新語言•Definition of Causation: Y is a cause of Z if we can

change Z by manipulating Y, namely, if after surgically removing the equation for Y, the solution for Z will depend on the new value we substitute for Y.

•THE DIAGRAM TELLS US WHICH EQUATION IS TO BE DELETED WHEN WE MANIPULATE Y.

• INTERVENTION AMOUNTS TO A SURGERY ON EQUATIONS, GUIDED BY A DIAGRAM, AND CAUSATION MEANS PREDICTING THE CONSEQUENCES OF SUCH A SURGERY.

Page 26: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

新典範與新語言•INTERVENTION AS SURGERY - CONTROL

LED EXPERIMENTS ▫假定我們要研究某種藥物是否能幫助病人從某些疾病復原。但影響復原的因素不只是藥物治療,還有其他的因素,如社經地位、年齡、生活方式等。這對我們判斷藥物的效果來說是個問題,因為我們不知道影響復原的程度是那個因素造成的。因此,我們希望能夠比較背景相同的病人,而這就是 Fisher的 Randomized Experiment能夠做到的。但隨機分派的實驗設計如何做到這種比較呢?

Page 27: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

新典範與新語言•這種實驗設計實際上有兩個部份: Randomization a

nd Intervention. • Intervention 就是我們將藥物給一些在正常情況下不會需要這種治療的病人,另一方面我們給一些尋求治療的病人安慰劑( placebo )。這也是先前提及的 SURGERY 的概念,因為我們將一個 functional link (如 SES )切斷,而用另一種替代。

•Fisher 的偉大貢獻是 connecting the new link to a random coin flip ,以此保證我們想要切斷的 link 是確實被切斷了,因為我們可以假定這個 random coin 是不受任何我們可以測量到的因素所影響的。

Page 28: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

新典範與新語言

Page 29: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

新典範與新思維•在新典範下,我們可以如何在無法從事實

驗的情況下,利用 observational studies

(如調查或病歷)的資料思考因果關係呢?

Page 30: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

發問方式• 兩類探索因果關係的研究問題

▫ 第一類研究問題: X 對 Y 的影響為何?研究目的是要知道: X 對 Y 有影響嗎? 有的話,影響有多大? 這是實驗設計所問的研究問題

▫ 第二類研究問題:影響 Y 的因素有哪些?研究目的是要知道: 所有可能解釋 Y 的因素有哪些。

Page 31: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

如何認定因果關係 ?•參考 Morgan, Stephen L.& Christopher Winship (2

007). Counterfactuals and Causal Inference: Methods and Principles for Social Research. New York, NY: Cambridge University Press.

Page 32: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

如何認定因果關係 ?•X Y (Had X taken a different value, then Y would

have taken a different value)

The causal relationship between X and Y is confounded if:• Z

X Y

Page 33: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

如何認定因果關係 ?•Z A

X Y•Z A (unobserved)

X Y

Page 34: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

如何認定因果關係 ?• X Y

C (collider)

• Z A (unobserved)

X Y

Page 35: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

Statistical Relations vs.Causal Relations

•Statistical dependence may reflect▫Random fluctuation (c. i. & p-value)▫X caused Y▫Y caused X (temporal order;

longitudinal data)▫X and Y share a common cause

(covariate adjustment)▫Association between X and is induced

by conditioning on a common effect of X and Y (selection bias; collider bias)

Page 36: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

如何推估 the effect of X on Y?

•當 X 與 Y 有 common causes 時,如能認定X 與 Y 間的因果路徑,可以因有效的控制一組共變項 Z ,且 Z 內沒有受 X 影響時,則我們可以清楚的推估 the effect of X on Y 。

•Pearl’s Back-door Criterion

Page 37: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

如何推估 the effect of D (treatment ) on Y? V (unobserved)

A F G

U (unobserved)

B D Y

C

Page 38: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

Pearl’s Back-door Criterion

• If one or more back-door paths connects the causal variable to the outcome variable,

Pearl shows that the causal effect is identified by

conditioning on a set of variables Z if and only if all back-door paths between the causal

variable and the outcome variable are blocked after conditioning on Z.

Page 39: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

Pearl’s Back-door Criterion

•A back-door path of D and Y is blocked by Z if and only if the back-door path satisfies any one of the

following:▫ contains a chain of mediation A → Z → B, or▫ contains a fork of mutual dependence A ← Z →

B;▫ contains an inverted fork of mutual causation

A → C* ← B, where C* and all its descendants

are not in Z.

Page 40: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

如何推估 the effect of D on Y? ( 控制 B & F 即可, Why? ) V (unobserved)

A F G

U (unobserved)

B D Y

C

Page 41: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

Pearl’s Back-door Criterion (continued)•從 Pearl 的 Back-door Criterion 來看,並不是控制越多變項就好,因為要是控制了 colliders 反而會有問題,因為本來 X 與Y沒有相關或因果關係的,控制這類變項後,反而會產生相關。

•Example▫如果 collider 是申請入學時是否被一所菁英學校接受( adm: 1-接受; 0-拒絕)

▫是否被接受是根據兩個獨立變項: SAT 及面試時對動機的評估 (Motivation)

▫因此: adm 是的兩個 causes 是 SAT 及 Motivation ,而 SAT 及 Motivation 間是獨立的。

Page 42: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

Example of controlling a collider

_cons -3.28e-09 .0633531 -0.00 1.000 -.1247788 .1247788 SAT .025 .0634802 0.39 0.694 -.1000291 .1500291 Motivation Coef. Std. Err. t P>|t| [95% Conf. Interval]

Total 249 249 .999999998 Root MSE = 1.0017 Adj R-squared = -0.0034 Residual 248.844375 248 1.00340474 R-squared = 0.0006 Model .155624956 1 .155624956 Prob > F = 0.6940 F( 1, 248) = 0.16 Source SS df MS Number of obs = 250

. reg Motivation SAT

Motivation 29.03388 21.40764 4.57 0.000 6.843622 123.1754 SAT 41.97531 34.4407 4.55 0.000 8.405896 209.6061 adm Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]

Log likelihood = -27.345829 Pseudo R2 = 0.6635 Prob > chi2 = 0.0000 LR chi2(2) = 107.85Logistic regression Number of obs = 250

. logistic adm SAT Motivation

Page 43: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

Example of controlling a collider

00

00

0

0

0

0

0

01

0

0

0

0

0

00

1

0

0

0

01

0

0

0

0

10 0

0

0

0

0

0

0

0

0

0

0

0

0

0

00

0

0

0

0

00

0

1

0

0

00

0

0

0

0 0

00

0

0

0

0

0

000

0

0

10

00

0

1

0

0

0

0

0

0

0

0

1

0

00

0

00

00

0

0

0

0

0

0

0

1

10

0

0

00

0

0

0

00

00

0

0

00

0

00

0

1

0

0

0

00

0

0

0

0

0

00

1

1

00

0

0

0

0

0

0

0

01

0

00

0

0

0

10

00

0

0

00

00

00

0

0

0

0

0

0

0

0

0

0

0

100

1

00

0

0

0

1

00

0

0

0

00

01

0

0

00

0

100

0

00

0

0

0

1

00

0

00

0

0

1

1

00

00

1

0

0

0

0

0

00

00

1

0

0

0

00

0

0

0

0

0

-4-2

02

4M

otiv

atio

n

-2 0 2 4SAT

Page 44: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

Example of controlling a collider

_cons -.1559085 .0611258 -2.55 0.011 -.2763028 -.0355143 adm 1.559085 .2100713 7.42 0.000 1.145326 1.972845 SAT -.1684419 .0631478 -2.67 0.008 -.2928187 -.044065 Motivation Coef. Std. Err. t P>|t| [95% Conf. Interval]

Total 249 249 .999999998 Root MSE = .90762 Adj R-squared = 0.1762 Residual 203.4701 247 .823765585 R-squared = 0.1829 Model 45.5299 2 22.76495 Prob > F = 0.0000 F( 2, 247) = 27.64 Source SS df MS Number of obs = 250

. reg Motivation SAT adm

Page 45: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

如何推估 the effect of D on Y? A F G

B D Y

C H

Page 46: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

如何有效的控制 confounding variables (Z) 呢?•如果 D 只有兩個值: 0 及 1 ,我們可以用實驗設

計的方式,將兩組相同特性的人,隨機分配到控制組( D = 0 )及實驗組( D = 1 ),即可達到前述的狀態。 Why?

•如果無法用實驗設計,而是用調查方法蒐集資料時,如何推估呢?▫條件性控制( conditioning )或是配對( matc

hing ): by holding <something> constant or by balancing/homogenizing the treatment & co

ntrol groups.

Page 47: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

The Counterfactual Framework

GroupPotential Outcomes

Y1 Y0

Treatment group (D = 1) Observable Counterfactual

Control group (D = 0) Counterfactual Observable

• 反事實因果推論的想像

Page 48: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

The Counterfactual Framework

•反事實分析架構的想像可看成是一種 thought experiment 。

•要想像的是同一個個體或群體在不同的狀態下,會有什麼可能的結果( potential outcomes )。

•這些可能結果間的差異,即為不同狀態(因)的效果。

•Counterfactuals should be reasonable !

Page 49: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

The Counterfactual Framework

Q :什麼是 unreasonable 的 counterfactuals 呢?

▫有什麼狀態不適合看成為 causes 的嗎?

▫有什麼樣的結果不適合想像 counterfactual 情況的嗎?

Page 50: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

The Counterfactual Framework

•個人層次的真正因果效應:δi = Yi

1 ─ Yi0

•The Fundamental Problem of Causal Inference :無法觀察同一個人同時在實驗組及控制組。

•加上一些假定,如 SUTVA ,則可推估群層次的因果效應。

Page 51: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

The Counterfactual Framework

•SUTVA : The Stable Unit Treatment Value Assumption – a priori assumption that the value of Y for unit u when exposed to treatment t will be the same no matter what mechanism is used to assign treatment t to unit u and no matter what treatments the other units receive.

Page 52: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

The Counterfactual Framework

•實驗設計是假設我們能夠將觀察到的替代無法觀察到的。

•如隨機分派到實驗組與控制組的個體的特性相同,則我們可以假定:▫如果實驗組的個人沒有接受 treatment 的話,其

結果與控制組觀察到的相同;▫如果控制組的個人接受 treatment 的話,其結果

與實驗組觀察到的相同。

Page 53: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

The Counterfactual Framework•當使用調查方法得到資料時,即 observational

data ,個人為何會接受或不接受 treatment ,往往不是一個隨機的現象。

•Observational data 通常有兩個問題:▫接受 treatment 者與不接受者有 baseline diffe

rences ,以及 heterogeneity of treatment effect.

▫可能有些影響接受 treatment 與否的變項,並未觀察到,亦即 omitted variables 的問題。

Page 54: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

The Counterfactual Framework

Group

Potential Outcomes

Y1 Y0

Treatment group (D = 1)

Observable E[Y1 | D = 1]

Counterfactual

E[Y0 | D = 1]

Control group (D = 0)

Counterfactual

E[Y1 | D = 0] Observable

E[Y0 | D = 0]

Page 55: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

The Counterfactual Framework

•以反事實架構的觀點來看,母群體層次的真正因果效應( ATE ; Average Treatment Effect )為:

•E[δ] = E[Y1 – Y0] = E[Y1] – E[Y0] = {πE[Y1 | D = 1] + (1 – π) E[Y1 | D = 0]} –

{πE[Y0 | D = 1] + (1 – π) E[Y0 | D = 0]} = π{E[Y1 | D = 1] – E[Y0 | D = 1] } + (1 – π) {E[Y1 | D = 0] – E[Y0 | D = 0] } = πE[δ| D = 1] + (1 – π) E[δ | D = 0]

Page 56: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

The Counterfactual Framework

• π :母群體中接受 treatment 的比例

• 不同組的因果效應:

▫ATT ( Average Treatment Effect on the Treated ) : E[Y1 |D = 1] – E[Y0|D = 1] ,即 E[δ| D = 1]

▫ATU ( Average Treatment Effect on the Untreated ) : E[Y1 |D = 0] – E[Y0|D = 0] ,即 E[δ | D = 0]

Q :我們可以假定不同組的人有同樣的因果效應嗎?

如果我們能夠做此假定的話,則 E[Y1 |D = 0] = E[Y1 |D = 1]

Page 57: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

The Counterfactual Framework

• 基準線的差異:E[Y0 |D = 1] – E[Y0|D = 0]

Q :我們可以假定不同組的人在未接受 treatment 前是一樣的嗎?

如果我們能夠做此假定的話,則 E[Y0 |D = 1] = E[Y0|D = 0]

Page 58: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

The Counterfactual Framework

如果我們只以觀察到接受 treatment 的組與觀察到未接受 treatment 的組之間的差異做為 Causal Effect 的估計時,此估計是一種 Naïve Estimate :

Naïve Estimate E[Y1 |D = 1] – E[Y0|D = 0] = average causal effect = E(δ) + baseline bias + {E(Y0|D=1) − E(Y0|D=0)} + differential effect bias +{E(δ |D=1) − E(δ |D=0)} (1−π)

Page 59: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

The Counterfactual Framework: A Review

反事實分析架構的五個關鍵概念:•Potential/Hypothetical States & Outcomes:

▫因果效應( causal effect )是利用 “ potential” 或 “ hypothetical” 的概念,而不是只用到 actual observations 。 .

•The ceteris paribus condition▫其他條件相同的條件下,也就是將其他因素控制成等同( equal )、固定不變( fixed )或是 constant 。

Page 60: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

The Counterfactual Framework: A Review•Heterogeneity:

▫個人對於 treatment 的反應是因人而異的。亦即因果效應在個人層次即被認定是有差異的。每個人的因果效應是:[potential outcome under the potential treatment state]─ [potential outcome under the potential control state]

•Fundamental Problem of Causal Inference: ▫由於 the counterfactual definition of causal effect

意涵著評估個人層次的因果效應會有 missing data 的問題。但是如果我們願意做一些假定的話,我們可以評估幾種 Average Causal Effects 。

Page 61: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

The Counterfactual Framework: A Review

•Basic Parameters of Interest:▫ATT: Average Treatment effect on the

Treated ▫ATU: Average Treatment effect on the

Untreated▫ATE: Average Treatment Effect

▫ the most basic one is ATT, and there are other meaningful causal parameters of interest than these three.

Page 62: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

反事實分析架構下分析觀察資料的方法•假設控制影響 treatment 之共變項後,就能達成

ignorability ,這也稱為 selection on observables )▫propensity score matching

•如果此假定不成立的話:▫instrumental variable▫Heckman selection model▫利用長期追蹤資料的特性,使用如 fixed effect

model , change score model•不同的分析方法,要做不同的假定

Page 63: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

傾向分數配對法介紹

關秉寅政治大學社會學系

2010.01.16

Introduction to Propensity Score Matching

Page 64: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

OLS 迴歸分析的問題•一般多元 OLS 迴歸分析,是一種 ATE 的估計,

其作法假定其控制足夠的共變項後,可以消除基準線差異,並假定接受 treatment 者的因果效應與未接受者相同。這些假定合理嗎?

•OLS 迴歸分析通常無法克服自我選擇的問題。•OLS 迴歸分析可能將接受 treatment 及沒接受

treatment 兩組中無法比較的人納入分析。如果兩組人的特性(基準線)相當不同,則 OLS 的推估會有大問題,因為其無法比較的部份是以 imputation 的方式來推估。

Page 65: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

反事實分析架構下分析觀察資料的方法

•假設只有 omitted variables ,且是可以用控制觀察到之變項來控制的話(即控制影響 treatment 之共變項後,就能達成 ignorability ,這也稱為selection on observables )▫propensity score matching ( PSM )是這

類假定下發展出來的分析方法。

Page 66: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

反事實分析架構下分析觀察資料的方法•selection on observables

• Z

• D Y

• U (unobservable)

Page 67: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

Propensity Score Matching ( PSM )

•假定:如果接受及不接受 treatment 兩種人的差異能夠被一組共變項( Z )完美解釋,那麼我們就可以用這些共變項進行分層配對,使得每層內有兩種人:接受者及不接受者,且這些人在各層中唯一的不同是他們是否接受 treatment 。然後,我們觀察這兩種人在 outcome 的差異為何。我們再進一步將各分層的差異,以及分層所佔的比例做適當加權,則可得到好的 ATE , ATT , ATU 的估計。

Page 68: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

Propensity Score Matching ( PSM)

• (Y1 , Y0 ) ╨ D | Z•實際上如果有許多共變項時,配對過程很麻煩,

且在樣本有限的情況下,有些分層會沒有個案。Paul Rosenbaum 及 Donald Rubin 在一系列的論文中,證明用所謂的「傾向分數」( propensity score )將是否會接受視為一種機率,然後以此分數來從事分層配對是可行的。

Page 69: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

Propensity Score Matching ( PSM)

•如何得到傾向分數?▫找到有意義可解釋是否會接受 treatment 的共變項

,然後做 Logit 或 Probit 迴歸,應變項為是否接受 treatment 。

•根據傾向分數將接受者及不接受者進行配對,並找到 common support 。在 common support 的樣本中,兩組人的分配是 balanced (檢視matching quality )。

Page 70: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

Propensity Score Matching ( PSM)

•實際從事 PSM 的運算方法有四大類:▫Exact Matching ▫Nearest Neighbor Matching ▫Interval Matching ▫Kernel Matching

• 不同運算方法的差異: With or without replacement How many units to match

Page 71: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

Propensity Score Matching ( PSM)•選擇不同運算法的兩難

▫要能 maximize 精準的配對(如用 strictly “nearest” or common-support region ), 可能會有比較多的樣本個案會被排除於分析之外。

▫要能包括比較多的配對樣本個案 (如擴大配對的範圍),就會有比較多不精準的配對。

•用 bootstrapping 方式求得 PSM 估計值的 standard errors

Page 72: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

Propensity Score Matching ( PSM)•實際可從事 PSM 的程式:

▫Stata: psmatch2 等▫SPSS: SPSS Macro for Propensity Score Matching (

http://ssw.unc.edu/VRC/Lectures/index.htm)▫SAS: “GREEDY” Macro (

http://www2.sas.com/proceedings/sugi26/proceed.pdf)

▫R: “MatchIt” (http://gking.harvard.edu/matchit/)

Page 73: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

運用 PSM的實例:補習數學有用嗎? • 研究問題:國三補習數學有用嗎?

▫ATT :如果國三補數學的人,沒補的話,數學成就會有差異嗎?

▫ATU :如果國三沒補數學的人,補習的話,數學成就會有差異嗎?

▫ATE :如果所有的人國三都補數學的話,數學成就會有差異嗎?

▫參考:關秉寅、李敦義( 2008 )。補習數學有用嗎?一個「反事 實」的分析。台灣社會學刊, 41 , 97-148 。

Page 74: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

運用 PSM的實例:補習數學有用嗎?•研究使用的資料: TEPS 國中樣本(公開使用版)

▫2001 ( N = 13,978 )▫2003 ( N = 13,247 )▫分析樣本 :公立國中生; with common support ( N = 10,013 )

Page 75: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

運用 PSM的實例:補習數學有用嗎?

• 應變項:國三數學能力 IRT ,轉換成 NCE ( normal curve equivalence )分數 (Range: 1 – 99; Mean: 50; S.D.: 21.06)

• 自變項( Treatment ):國三補習數學• 26 個配對變項:

▫ 個人特性及學習特質:性別、補習經驗、W1數學 IRT等(motivation, ability )

▫家庭背景:父母教育程度、職業、教育期待等▫班級 / 學校學習氣氛及環境

Page 76: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

運用 PSM的實例:補習數學有用嗎?

•分析策略:只研究國三數學補習的效果▫國三補習主要是為了準備基測▫學校教育對數學能力的培養比較有影響力

•以階層性模型探討國三補習的參與及補習效果,以瞭解過往補習研究可能有的限制,以及比較 OLS 及 PSM 兩者估計 ATE 可能有的差異

•比較有及沒有 W1數學 IRT 做為配對變項的差異

Page 77: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

運用 PSM的實例:補習數學有用嗎?•使用 Stata ( version 9 以上版本)的指令: psmatc

h2 及 bootstrap•PSMATCH2: Stata module to perform full Mahalanobi

s and propensity score matching, common support graphing, and covariate imbalance testing (by Edwin Leuven & Barbara Sianesi)

•Bootstrap 用來估計 standard error of the estimate

Page 78: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

運用 PSM的實例:補習數學有用嗎?• use D:\w2w1all01, clear• set seed 19123584• psmatch2 w2s1102 w1s502 mathtime w1s535-w1s550 w1tms1 w1tms3 /

// w1s507d w2s1121d cram1-cram3 ethn2-ethn4 paedu2 paedu3 ///

paocc1-paocc2 w1p5152-w1p5154 nuintact sibsize ///eduexp2 eduexp3 grouping w1s309-w1s318 w1urban32-w1urba

n33 /// w1m3p29c, out(w2m3p28NCE) kernel common logit ate

• gen ps=_pscore

Page 79: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

運用 PSM的實例:補習數學有用嗎?

_cons -.2456198 .2961725 -0.83 0.407 -.8261073 .3348676 w1m3p29c .1882496 .0308065 6.11 0.000 .12787 .2486292 w1urban33 .6316685 .1116324 5.66 0.000 .412873 .8504641 w1urban32 .3659348 .1112798 3.29 0.001 .1478304 .5840392 w1s318 .0036893 .0305617 0.12 0.904 -.0562106 .0635892 w1s317 -.0837422 .0298398 -2.81 0.005 -.1422271 -.0252572 w1s316 .0510998 .0333087 1.53 0.125 -.0141841 .1163838 w1s315 -.0107513 .0282028 -0.38 0.703 -.0660278 .0445251 w1s309 .1079485 .0271998 3.97 0.000 .0546378 .1612592 grouping -.0359304 .0581625 -0.62 0.537 -.1499268 .078066 eduexp3 .6798024 .099277 6.85 0.000 .485223 .8743818 eduexp2 .5042964 .0858112 5.88 0.000 .3361094 .6724833 sibsize -.0765143 .0194415 -3.94 0.000 -.114619 -.0384096 nuintact .2259083 .0607856 3.72 0.000 .1067708 .3450458 w1p5154 1.006179 .1108639 9.08 0.000 .78889 1.223468 w1p5153 .8032888 .0918514 8.75 0.000 .6232635 .9833142 w1p5152 .4493477 .0872949 5.15 0.000 .2782528 .6204425 paocc2 .0958511 .0572689 1.67 0.094 -.0163939 .2080961 paocc1 .2022489 .0589527 3.43 0.001 .0867038 .317794 paedu3 -.4139991 .1370291 -3.02 0.003 -.6825712 -.145427 paedu2 .156507 .0575545 2.72 0.007 .0437023 .2693118 ethn4 -.6514906 .154933 -4.20 0.000 -.9551536 -.3478275 ethn3 .0318565 .0717653 0.44 0.657 -.108801 .172514 ethn2 .0328902 .0702542 0.47 0.640 -.1048056 .1705859 cram3 -.2523984 .1042133 -2.42 0.015 -.4566527 -.0481441 cram2 -.4560749 .0871879 -5.23 0.000 -.62696 -.2851899 cram1 -.7770591 .085213 -9.12 0.000 -.9440735 -.6100447 w2s1121d -.8260525 .051729 -15.97 0.000 -.9274395 -.7246655 w1s507d .0330961 .0883917 0.37 0.708 -.1401485 .2063406 w1tms3 .1107166 .0365143 3.03 0.002 .03915 .1822832 w1tms1 -.4073255 .0394947 -10.31 0.000 -.4847336 -.3299174 w1s550 .0215024 .0245201 0.88 0.381 -.0265561 .0695609 w1s537 .0680199 .0355634 1.91 0.056 -.0016831 .1377229 w1s536 -.0847454 .0342559 -2.47 0.013 -.1518857 -.0176051 w1s535 -.0678964 .0329894 -2.06 0.040 -.1325545 -.0032383 mathtime .1435434 .0508503 2.82 0.005 .0438787 .2432081 w1s502 -.0833313 .0470693 -1.77 0.077 -.1755854 .0089228 w2s1102 Coef. Std. Err. z P>|z| [95% Conf. Interval]

Log likelihood = -5939.0544 Pseudo R2 = 0.1442 Prob > chi2 = 0.0000 LR chi2(36) = 2001.93Logistic regression Number of obs = 10039

Page 80: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

運用 PSM 的實例:補習數學有用嗎?

•誰參加國三數學補習?▫個人特性及學習特質:先備能力較佳、過去沒補習經驗者、回家會複習功課、自己沒有補習的意願

▫家庭背景:非原住民、與雙親同住、父母不是研究所學歷、白領職業、高收入、高父母教育期望、手足人數少

▫ 班級 /學校情況:位於在都市化程較高地區、班上讀書風氣盛、學業競爭激烈程度高

Page 81: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

運用 PSM的實例:補習數學有用嗎?• ---------------------------------------------------------------------------------------------------------• Variable Sample | Treated Controls Difference S.E. T-st

at• --------------------------------------------------------------------------------------------------------- w2m3p28NCE Unmatched | 57.1492421 44.4285175 12.7207246 .40052829 31.76

<observed> <potential> <outcome>• ATT | 57.1242786 54.866121 2.25815756 .479776217 4.71• ATU | 44.6844424 48.2644102 3.57996779• ATE | 2.95584959• ----------------------------+----------------------------------------------------------------------------• Note: S.E. for ATT does not take into account that the propensity score is estimated.

• psmatch2: | psmatch2: Common• Treatment | support• assignment | Off suppo On suppor | Total• --------------+---------------------------+----------• Untreated | 61 5,263 | 5,324 • Treated | 7 4,708 | 4,715 • -------------+----------------------------+----------• Total | 68 9,971 | 10,039

Page 82: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

運用 PSM的實例:補習數學有用嗎?• pstest w2s1102 w1s502 mathtime w1s535-w1s550 w1tms1 w1tms3

/// w1s507d w2s1121d cram1-cram3 w1m3p29c ethn2-ethn4 /// paedu3 paocc1-paocc2 w1p5152-w1p5154 nuintact sibsize /// eduexp2 eduexp3 grouping w1s309-w1s318 /// w1urban32-w1urban33, summary treated(_treated)

Matched 2.2485 2.2687 -2.1 89.1 -0.99 0.324 w1s550 Unmatched 2.2503 2.0648 19.2 9.59 0.000 Matched 1.9437 1.9238 2.6 77.5 1.30 0.193 w1s537 Unmatched 1.9421 2.0306 -11.7 -5.85 0.000 Matched 2.2459 2.2336 1.5 87.5 0.73 0.465 w1s536 Unmatched 2.2431 2.3418 -12.0 -5.98 0.000 Matched 2.0205 2.0085 1.5 86.9 0.72 0.470 w1s535 Unmatched 2.0185 2.1101 -11.2 -5.58 0.000 Matched .2798 .28553 -1.3 89.1 -0.62 0.538 mathtime Unmatched .27996 .22746 12.1 6.06 0.000 Matched .48774 .49835 -2.1 52.0 -1.03 0.304 w1s502 Unmatched .48802 .51014 -4.4 -2.21 0.027 Matched 1 0 . . . . w2s1102 Unmatched 1 0 . . . Variable Sample Treated Control %bias |bias| t p>|t| Mean %reduct t-test

Page 83: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

運用 PSM的實例:補習數學有用嗎?

99% 3.467881 3.467881 Kurtosis 2.67406395% 2.900254 2.900254 Skewness .576044190% 2.694701 2.8343 Variance .710703575% 1.782969 2.694701 Largest Std. Dev. .843032350% 1.439995 Mean 1.366565

25% .7289222 .3174218 Sum of Wgt. 3710% .3174218 .3134599 Obs 37 5% .2346073 .2346073 1% .0326583 .0326583 Percentiles Smallest AFTER MATCHING

99% 55.57048 55.57048 Kurtosis 3.5719895% 54.21405 54.21405 Skewness .94056990% 32.9365 32.98215 Variance 186.149475% 27.73524 32.9365 Largest Std. Dev. 13.6436650% 12.08539 Mean 18.13108

25% 7.567391 3.638223 Sum of Wgt. 3710% 3.638223 2.777662 Obs 37 5% 1.474137 1.474137 1% .6808444 .6808444 Percentiles Smallest BEFORE MATCHING

Summary of the distribution of the abs(bias)

Page 84: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

運用 PSM的實例:補習數學有用嗎?• set seed 19123584• psmatch2 w2s1102, out(w2m3p28NCE) pscore(ps) mahal(w2stwt1) ///

add kernel common logit

------------------------------------------------------------------------------------------------------------ Variable Sample | Treated Controls Difference S.E. T-stat--------------------------------------+--------------------------------------------------------------------------------- w2m3p28NCE Unmatched | 57.1492421 44.4285175 12.7207246 .40052829 31.76 ATT | 57.1044268 54.9845736 2.11985317 .49239495 4.31----------------------------+--------------------------------------------------------------------------------------------Note: S.E. for ATT does not take into account that the propensity score is estimated.

psmatch2: | psmatch2: Common Treatment | supportassignment | Off suppo On suppor | Total-----------+---------------------------------------+---------- Untreated | 0 5,324 | 5,324 Treated | 26 4,689 | 4,715 ---------------+------------------------------------+---------- Total | 26 10,013 | 10,039

Page 85: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

運用 PSM 的實例:補習數學有用嗎?• psgraph, bin(50) treated(_treated) support(_support) /// pscore(_pscore)

▫檢視有 common support 的分析樣本的 balance

0 .2 .4 .6 .8 1Propensity Score

Untreated Treated: On supportTreated: Off support

Page 86: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

運用 PSM 的實例:補習數學有用嗎?• bs r(att): psmatch2 w2s1102, out(w2m3p28NCE) pscore(ps) /// mahal(w2stwt1) add kernel common logit

Bootstrap results Number of obs = 10039 Replications = 50

command: psmatch2 w2s1102, out(w2m3p28NCE) pscore(ps) mahal(w2stwt1) add kernel common logit _bs_1: r(att)---------------------------------------------------------------------------------------------- | Observed Bootstrap Normal-based | Coef. Std. Err. z P>|z| [95% Conf. Interval]---------+------------------------------------------------------------------------------------ _bs_1 | 2.11783 .4667819 4.54 0.000 1.202954 3.032706------------------------------------------------------------------------------

Page 87: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

運用 PSM 的實例:補習數學有用嗎? •國三補習數學有用嗎?

▫ Gross effect (OLS): 12.243 (分析樣本 with common support)

▫ After controlling all matching variables (OLS): 3.017 – an estimate of ATE

• PSM results (all matching variables included):▫ Total population (ATE): 2.956▫ Treated (ATT): 2.258▫ Untreated (ATU): 3.580

Page 88: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

運用 PSM 的實例:補習數學有用嗎? •階層性模型分析結果顯示

▫PSM 的 ATE 估計大多比 OLS 的估計小▫ATT 比 ATU小▫都會受到未納入重要自變項的影響

Page 89: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

運用 PSM 的實例:補習數學有用嗎?

•PSM stratified by propensity scores 1st stratum (lowest) 3.519 2nd stratum 4.063 3rd stratum 3.384 4th stratum 1.997 5th stratum (highest) 2.950

• 1st – 3rd stratum 3.292• 4th – 5th stratum 2.557

Page 90: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

運用 PSM 的實例:補習數學有用嗎? • PSM stratified by prior math ability scores

1st stratum (lowest) 3.600 2nd stratum 4.406 3rd stratum 2.101 4th stratum 3.215 5th stratum (highest) 2.108 1st – 3rd stratum 4.203 4th – 5th stratum 2.248

Page 91: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

運用 PSM 的實例:補習數學有用嗎? • PSM stratified by whose decision to undertake math

cramming▫ Student’s own decision 2.281▫ Decision made by others 1.429

• PSM stratified by parents’ education level▫ High school 4.712▫ College and above 1.371

Page 92: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

運用 PSM 的實例:補習數學有用嗎? •國三補習數學有用嗎?•補習的時間更長的話,是否效果更好?•其他科補習的效果呢?•TEPS數學 IRT 不是基測成績?•大家知道這個結果,會減少補習嗎?

Page 93: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

運用 PSM 的實例:補習數學有用嗎?Q :如果 treatment (如補習)不只是接受 與否時,怎麼辦?

Group YD1 YD2 ….. YDj

Takes D1

Observable as Y

Counterfactual

….. Counterfactual

Takes D2

Counterfactual

Observable as Y

….. Counterfactual

….. ….. ….. ….. …..

Takes Dj Counterfactual

Counterfactual

….. Observable as Y

Page 94: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

運用 PSM 的實例:補習數學有用嗎?Q :如果解釋是否接受 treatment 的共變項 不是都可被觀察到的,怎麼辦?

Selection on the observables vs. Selection on the unobservables

Page 95: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

運用 PSM 的實例:補習數學有用嗎?•Sensitivity analysis•參考:

▫DiPrete, T. A. & Gangl, M. (2004). Assessing bias in the estimation of causal effects: Rosenbaum bounds on matching estimators and instrumental variables estimation with imperfect instruments. Sociological Methodology, 34, 271–310.

▫ Caliendo, M. & Kopeinig, S. (2008). Some Practical Guidance for the Implementation of Propensity Score Matching. Journal of Economic Surveys, 22, 31-72.

Page 96: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

運用 PSM 的實例:補習數學有用嗎?•如果是否補習的機率是 πi ,且此機率不僅是為觀察

到的配對變項 xi 所決定,也受到未觀察到之變項 ui

的影響,則 πi = Pr(Di = 1 | xi) = F (βxi + γui) 。•ui 可設定介於 0 與 1 間,而 γ 是 ui 對參與補習的影

響效果。隨著所設定之 γ 大小的變化,研究者可以評估處理效果受到潛在偏誤之影響的敏感度。

•Rosenbaum ( 2002 )將兩人有同樣配對變項數值,但因未觀察變項影響而有不同的接受實驗處理之機率的潛在偏誤上下限訂為介於 1/Г 及 Г 之間 。

Page 97: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

運用 PSM 的實例:補習數學有用嗎?• gen delta = w2m3p28NCE - _w2m3p28NCE if _treated==1 & /// _support==1• rbounds delta, gamma(1 (0.05) 2)

1.5 .991994 0 -.648689 5.65514 -1.1861 6.16496 1.45 .921584 0 -.38144 5.40027 -.916216 5.90901 1.4 .651198 0 -.104479 5.13329 -.636678 5.64383 1.35 .249543 0 .182048 4.85537 -.347525 5.36746 1.3 .03747 0 .478479 4.56627 -.048146 5.07914 1.25 .001696 0 .787757 4.26565 .262282 4.77819 1.2 .000018 0 1.10691 3.95152 .584407 4.46356 1.15 3.8e-08 0 1.44109 3.62183 .920764 4.13528 1.1 1.2e-11 0 1.78947 3.27694 1.26991 3.79062 1.05 4.4e-16 0 2.15427 2.91407 1.63508 3.42905 1 0 0 2.53564 2.53564 2.01807 3.04954 ----------------------------------------------------------------------Gamma sig+ sig- t-hat+ t-hat- CI+ CI-

Rosenbaum bounds for delta (N = 4689 matched pairs)

Page 98: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

運用 PSM 的實例:補習數學有用嗎?•針對國三補習數學者與從未補習者配對成功的 4689

對中進行敏感度分析的結果是,如果未觀察到之變項對影響補習參與與否的影響力,即 Gamma ( γ ),是介於 1.25 到 1.35 時,就可能會變成不顯著。

•取這些數值的自然對數,則分別為 0.223 及 0.300 ,如與實際配對變項對是否補習之邏輯迴歸係數比較,則此數值大約是完整家庭( nuintact )的係數(.226 )。也就是說,這未觀察到變項對補習與否的影響力至少要像完整家庭一樣大,才會影響 ATT 的變化。

Page 99: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

PSM 其他限制

•通常需要大樣本。•Treat group 與 Control group 配對後應該有

足夠的重疊。•即使是以觀察到的變項進行配對,仍可能有 hidd

en bias 。

Page 100: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

反事實分析架構下分析觀察資料的方法

•其他在 selection on unobservables 時可用的方法:▫instrumental variable▫Heckman selection model▫利用長期追蹤資料的特性,使用如 fixed effect

model , change score model•不同的分析方法,要做不同的假定

Page 101: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

反事實分析架構下分析觀察資料的方法•selection on unobservables

• Z

• D Y

• U (unobservable)

Page 102: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

結合 PSM 與其他分析方法•結合迴歸分析。•結合 multi-level modeling 。

Page 103: Counterfactuals and PSM

06.09.061資料庫研究與統計方法學

謝謝聆聽,並請指教!

Q & A