全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
2017-7-26 22:56:49
数据窗口有匹配的样本,变量名为_n1
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2017-8-9 15:43:03
keep if _weight==1
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2017-8-16 00:12:53
有没有大神可以传一段讲解的视频啊?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2017-11-14 23:46:01
if _weight  !=.

We will discuss how to run regressions on a matched sample because it remains a popular technique, but we cannot recommend it.
psmatch2 makes it easy by creating a _weight variable automatically. For observations in the treated group, _weight is 1. For observations in the control group it is the number of observations from the treated group for which the observation is a match. If the observation is not a match, _weight is missing. _weight thus acts as a frequency weight (fweight) and can be used with Stata's standard weighting syntax. For example (starting with a clean slate again):
use http://ssc.wisc.edu/sscc/pubs/files/psm, replace
psmatch2 t x1 x2, out(y) logit
reg y x1 x2 t [fweight=_weight]

Observations with a missing value for _weight are omitted from the regression, so it is automatically limited to the matched sample.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2017-11-26 11:53:04
请问你现在的问题解决了吗?我也遇到同种情况,想向你咨询一下
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-6-27 13:52:45
我自己的一点想法,首先给每个数据样本设置一个编号1-n,变量名定义为ID。进行PSM后,直接根据_id排序,然后把数据分叉保存成两部分,一份数据是实验组样本,一份数据是控制组样本。在试验组样本中,此时不是有_n1这个变量嘛,说的就是匹配样本的对应编号啊。建立一个空白数据文件,取名example,然后把_n1拷进去,定义变量名为ID,这时候根据ID条件对空白数据文件和控制组进行n:1形式的merge合并,得到的不就是匹配后的实验组样本嘛!这是笨方法,高手可以编写个程序,可能会更简单
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2019-3-23 16:57:33
beiluo08 发表于 2017-11-14 23:46
if _weight  !=.

We will discuss how to run regressions on a matched sample because it remains a p ...
如果weight=1呢
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2019-3-23 16:57:58
青枫半村户9 发表于 2019-3-23 16:57
如果weight=1呢
不是,等于234呢
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2019-11-9 11:23:16
drop if _weight==.  命令是对的。
不能只保留weight等于1的样本,因为weight可以理解为该样本点被匹配到了几次,比如weight=2,就说明有两个其他样本都是和这个匹配的。
on support代表在common support区间里,只有on support的样本才参与匹配。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2019-11-9 12:14:45
针对这个问题,有心想深入了解者 (要深入了解”实用”计量模型,北京,1/12-1/14),请考虑参加经管之家主办:Stata实用计量方法 http://www.peixun.net/view/1377.html
复制代码

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2020-2-14 23:28:59
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2020-3-11 20:50:37
你用psm匹配后,再用下面这个命令删除
foreach i in _weight {
drop if `i'==.
}
然后edit,就可以看到了
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2020-9-7 17:23:42
beiluo08 发表于 2017-11-14 23:46
if _weight  !=.

We will discuss how to run regressions on a matched sample because it remains a p ...
请问这部分讲解的出处是哪里?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2020-10-20 14:10:39
请问楼主解决了吗,我最近也遇到了这个问题呢
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群