楼主: ccaattcat
12011 17

[一般统计问题] PSM后手动DID,如何根据psmatch2的结果寻找对照组? [推广有奖]

11
黃河泉 在职认证  发表于 2017-6-7 10:34:19 |只看作者 |坛友微信交流群
ccaattcat 发表于 2017-6-7 10:22
恕我才疏学浅。。您写的命令每一步都差不多能看懂,但是没太懂您这些命令是为了实现怎样的效果。。您为什 ...
1. 去掉 _weight 缺失的数据是因為那些觀察值沒有被配對 (用) 到。2. 我假設的例子是找尋"兩個" n(2) 最近 propensity score 的觀察值來配對,所以各佔一半的權數 (0.5),乘以 2,表示其出現之次數;若是 n(1),就不必乘以 2。3. expand 則是將那些出現次數比 1 次多的重複複製,這樣才符合 1 對 2 之情況!

使用道具

12
caige1 发表于 2019-7-28 20:23:10 |只看作者 |坛友微信交流群
黃河泉 发表于 2017-6-7 10:34
1. 去掉 _weight 缺失的数据是因為那些觀察值沒有被配對 (用) 到。2. 我假設的例子是找尋"兩個" n(2) 最近 ...
请问然后怎么实现DID呢

使用道具

13
dlfxdks 发表于 2019-8-1 09:35:45 来自手机 |只看作者 |坛友微信交流群
黃河泉 发表于 2017-6-7 10:34
1. 去掉 _weight 缺失的数据是因為那些觀察值沒有被配對 (用) 到。2. 我假設的例子是找尋"兩個" n(2) 最近 ...
黄老师您好,请问您能推荐一篇psm+did的论文吗,因为psm部分的一些细节不是很能理解,譬如逐年匹配,1:1 还是1:n ,匹配完的数据集如何保存下来 进行did,想folllow一篇相关论文(最好有data和do文件)如能推荐万分感谢,祝好

使用道具

14
诗成 发表于 2019-8-13 22:57:44 |只看作者 |坛友微信交流群
So, you need the variable which identifies each pair. I haven't used -psmatch2- in a long time and I don't remember how you get that variable. BUt, let's assume you have it and it's called pairid. You also presumably have a subject_id for each person (or firm, or whatever they are). Then you have to account for the pairing as follows:

Code:
mixed y t x1 x2 || pair_id: || subject_id
BUT, there is another problem. You said you want to do a difference in differences analysis. That regression equation doesn't do that. So you also need another variable that indicates pre- and post- onset of treatment status, call it pre_post. Then what you want is:

Code:
mixed y i.t##i.pre_post x1 x2 || pair_id: || subject_id:
The DID estimator of the treatment effect will be the coefficient of 1.t#.pre_post. The best way to understand the results, though, is to look at predicted outcomes in each group both before and after the onset of treatment. -margins t#pre_post- will give you that.

使用道具

15
17866542019 发表于 2019-9-4 19:08:21 |只看作者 |坛友微信交流群
ccaattcat 发表于 2017-6-7 10:25
我现在粗糙的解决了一下,可以根据生成的_weight、_support和_treat变量来挑选哪些变量匹配成功了,但是这 ...
你好,请问如何根据——weight、_support _treated看出配对成功的呢?是_weight=1且support 吗?

使用道具

16
黃河泉 在职认证  发表于 2019-9-5 09:29:20 |只看作者 |坛友微信交流群

类似问题可考虑参加 http://www.peixun.net/view/1377.html,彻底了解 PSM。

使用道具

17
2015lqh 学生认证  发表于 2020-3-12 01:27:56 |只看作者 |坛友微信交流群
caige1 发表于 2019-7-28 20:23
请问然后怎么实现DID呢
比如原来用xtreg y treat year treat*year,fe r,那么现在加一个if _weight!=.即可

使用道具

18
爱我别走kobe 发表于 2022-9-14 12:34:19 |只看作者 |坛友微信交流群
黃河泉 发表于 2017-6-6 18:08
黄老师您好,您的代码只是针对最近邻匹配如何加权,那么要是针对其他匹配方法比如核匹配和半径匹配的话,该如何设置权重呢?请您指教~~

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-28 19:12