SlideShare a Scribd company logo
1 of 19
Download to read offline
不連続回帰と
rdrobustパッケージの紹介
TokyoR #74
自己紹介
● Yusuke Kaneko
● 新卒1年目
● 東大経研統計コース → サイバーエージェント
● twitter:@coldstart_p
● github:https://github.com/ykaneko1992
● 趣味 : kaggle(半年前から始めた)
○ santander 12 / 4484(Gold)
○ Home credit 145 / 7198(silver)
○ plasticcとRstudioコンペに参加中
kaggleのアイコン
今日の話
宗教的政治が女性の教育などに与える影響を
選挙結果データを通じて不連続回帰(RDD)で
因果推論する,という話
スライドの内容について
● 内容は主に以下の論文を参照しています
○ Meyersson, Erik. "Islamic Rule and the Empowerment of the Poor and Pious." Econometrica 82.1 (2014):
229-269 : データとアイディアについて
○ Calonico et al. "rdrobust: An r package for robust nonparametric inference in regression-discontinuity designs." R
Journal 7.1 (2015): 38-51. : rdrobustパッケージについて
○ Cattaneo et al . "A Practical Introduction to Regression Discontinuity Designs: Part I. Cambridge Elements:
Quantitative and Computational Methods for Social Science." (2018) : 分析の流れやコードについて
● 因果推論手法とそのための Rパッケージの紹介が目的です
イスラム教的政治と女性の権利
● イスラム教が女性に与える権利の制約は強い,というイメージが一般にある
○ ヘジャブ, ブルカの着用 , etc…
○ 直感的には女性の教育や社会進出にも悪い影響がありそう
● 実際,イスラム教保守主義の影響が強い選挙区では女性の権利が乏しい傾向がある
○ しかしこれが因果関係によるものかはよくわかってない
● イスラム教的な政治支配が女性の教育などにどう影響するのか? を分析したい
or
トルコの選挙データ
● 民主主義的な選挙によってイスラム教政党が勝利したケースが近年存在
● 1994年に14党で争われたトルコ地方選挙ではイスラム主義政党が第2党に
○ これにより,イスラム系の市長がいる自治体とそうでない自治体が出現
○ イスラム系の勝利率は 12%
● アイディア : イスラムが勝利した自治体と敗北した自治体で集計をとって比較すれば良い?
○ 15 ~ 20歳の女性の2000年までの高校修了率を被説明変数 (Y)にして集計
イスラム系自治体 非イスラム系
自治体
比較(Naive)
● T = 1がイスラム教勝利地区
● 明らかにイスラム教地区の方が低い
○ 差は約2%
比較(Naive)
…?
問題
● 市長は選挙で選ばれるため,統治の割り当てはランダムではない
● 何らかの未知の理由が選挙結果と修了率の両方に影響している可能性がある
○ そのような未知の理由がある場合,修了率低下はイスラム統治の因果効果とは言えない
○ また,この未知の理由はデータでは直接観測できない可能性がある
● 適切な因果推論手法を用いて分析したい
修了率↓
修了率↑
Unknown
Reason
不連続回帰(RDD)
● イスラム系政党の得票率と,非イスラム系政党の得票率の差を変数 Xにする
● 得票率の差が0に近い,つまり接戦だった自治体はほぼ同じような自治体として考えられる
○ 自治体AとDは全く別物だが,BとCは近い地区
● 閾値0に近い自治体ではイスラム政治をランダムに割り当てている と考えていいという発想
● 閾値近くのサンプルのみで回帰を行なって,差を処置効果として考える = 不連続回帰(RDD)
0100 -100
A B C D
X
Package
● ここ5年ほどでRDDのR用パッケージが急速に発展している
● rdrobustパッケージを今回は使う
○ CRANからダウンロード可能
● 推定とグラフ化もサポート
rd”robust” ?
0100 -100 X
● どれだけ閾値近くのサンプルを持ってくるか? という問題がある
○ 幅を狭くすればより同質になるが,サンプルが少なくなるので推定精度は悪化する
● この最適幅やそれに伴う推定の信頼区間の修正の近年の論文を反映したパッケージ
○ 最適幅 : Imbens and Kalyanaraman (2012)
○ 信頼区間修正 : Calonico, Cattaneo and Titiunik (2014)
which?
Experiment(Raw Plot)
Experiment (Estimation)
1行で推定可能
約3%の正の効果がある
Experiment (Plot)
プロットのコード
ここの差が因果効果と解釈可能
(Xをbin化して平均を取ったものが点 )
比較(RDD)
!
理由
● 論文内ではこの因果効果が出た理由についても考察されている.
● 第2党,福祉党の以下の政策を理由の例として挙げている
1. ヘッドスカーフの禁止を無視した政策
■ 保守的な地域だとヘッドスカーフ無しで学校に娘を送り迎えすることに抵抗がある
2. 教育施設を宗教的に保守的な地域に移した
■ 財力のある宗教的な経済組織がそのような地域に教育施設を建てることで,保守的な
両親も娘を学校に行かせやすくなる
● 実は経済学外のイスラム研究でイスラム政党が女性の参入障壁の克服に有効と指摘されてきた
○ したがって,このような説明とも整合的
RDDについてもう少し
● 今回は閾値がはっきりしているケースの RDDを扱ったがこれをSharp RDDという
○ 他には閾値がはっきりしない場合の Fuzzy RDDがある
● 近年の拡張だと閾値が複数あるケース,今回の Xのような変数が離散のケースなど
● また,いわゆる外的妥当性の問題がある
○ 要は閾値近辺のサンプルに限定するので求めた因果効果は閾値周辺でしか妥当でない
○ これについての研究も最近存在 ( 例 : Angrist and Rokkanen (2015) )
まとめ
● トルコのデータを使った実証分析例を使って RDDのアイディアについて説明
● イスラム政党の統治が女性の教育参加に正の効果を持つという結果
● 近年急速に整備されている Rのrddパッケージの紹介
● 特にrdrobustは非常に実行が容易かつ簡潔

More Related Content

Featured

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 

Featured (20)

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 

TokyoR_74_RDD