用stata处理did模型需要哪些数据

如题所述

第1个回答  推荐于2017-11-22
这个刚回答过你啊,或者你的同学
给你一个例子:
cd "C:\DATA\Econ 562\homework"
use eitc, clear

gen anykids = (children >= 1)
gen post93 = (year >= 1994)

mean work if post93==0 & anykids==0 /* value 1 */
mean work if post93==0 & anykids==1 /* value 2 */
mean work if post93==1 & anykids==0 /* value 3 */
mean work if post93==1 & anykids==1 /* value 4 */Then you must do the calculation by hand (shown on the last line of the R code).
(value 4 – value 3) – (value 2 – value 1)

Run a simple D-I-D Regression
Now we will run a regression to estimate the conditional difference-in-difference estimate of the effect of the Earned Income Tax Credit on “work”, using all women with children as the treatment group. This is exactly the same as what we did manually above, now using ordinary least squares. The regression equation is as follows:

Where is the white noise error term, and is the effect of the treatment on the treated — the shift shown in the diagram. To be clear, the coefficient on is the value we are interested in (i.e., ).本回答被提问者采纳
相似回答