分享

一文读懂Differences‐in‐Differences(一)

 liyu_sun 2020-09-09

一、简介

双重差分法(Difference-in-difference,DID)有几种其他的称谓:倍差法、差分再差分等。该方法的原理非常简单,它要求数据期至少有两期,所有的样本被分为两类:实验组和控制组,其中实验组在第一期是没有受到政策影响,此后政策开始实施,第二期就是政策实施后的结果,控制组由于一直没有受政策干预,因此其第一期和第二期都是没有政策干预的结果。双重差分方法的测算也非常简单,两次差分的效应就是政策效应。

二、命令介绍

diff can be installed or updated from the SSC archive by running the command: 

ssc install diff, replace 下载安装方法(外部命令)

The diff syntax is detailed as follows: 

diff outcome_var [if] [in] [weight] ,[ options] 

outcome_var :结果变量

period(varname) :实验期变量

treated(varname) :处理变量

cov(varlist) :协变量。

三、案例介绍

案例数据介绍:cardkrueger1994

背景介绍:In this case, the authors study the impact of the increase in the minimum wage in the state of New Jersey -the treated group- on the employment level at the fast food industry. They compare the changes in the number of employees at the restaurants in this treated group to the ones of the neighbor state, Pennsylvania -the control group-. They collect a baseline in February, 1992, and a follow-up in November.

数据结构如下:

1、DID with no covariates不带协变量的估计

diff fte, t(treated) p(t)

bootstrapped 稳健标准误

2、DID with  covariates带协变量的估计

diff fte, t(treated) p(t) cov(bk kfc roys) 

·

·

·

END

l 计量经济学服务中心 l

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章