楼主: sunny虾
5653 6

[数据管理求助] 求如何用stata实现样本匹配 [推广有奖]

  • 0关注
  • 0粉丝

初中生

66%

还不是VIP/贵宾

-

威望
0
论坛币
975 个
通用积分
1.0675
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
61 点
帖子
9
精华
0
在线时间
23 小时
注册时间
2012-3-17
最后登录
2018-8-11

楼主
sunny虾 发表于 2013-8-4 19:43:47 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
有一份数据,要求对每一个POLICY=1的样本找4个POLICY=0的配对样本满足YEAR SIC2 DP相同然后FS最接近,求出配对样本的MB  TA CHR 的,与样本进行比较,该怎么做呀,不知道数据格式有没有错误,看了之前voodoo的一些帖子回复,不明白呀,太笨了,求哥各位大身帮帮忙~
CUSIP是公司的代码

二维码

扫码加我 拉你入群

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

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

关键词:Stata tata 如何用 Policy 配对样本 如何 样本

sample.zip
下载链接: https://bbs.pinggu.org/a-1377558.html

4.42 MB

本附件包括:

  • sample.dta

沙发
sunny虾 发表于 2013-8-4 19:45:58
MB TA CHR 的 mean

藤椅
ctx5518 发表于 2013-8-5 11:58:22
1. create two datasets from orignial dataset - dataset with policy =1 and dataset with policy = 0
2. use joinby to link all of possible matched observations
3. Check for the closest 4 observations based on FS

板凳
sunny虾 发表于 2013-8-5 19:38:43
ctx5518 发表于 2013-8-5 11:58
1. create two datasets from orignial dataset - dataset with policy =1 and dataset with policy = 0
2 ...
sorry, How to conduct the thrid step, I am a beginner for stata~

报纸
ctx5518 发表于 2013-8-6 08:37:40
1. When you create the two dataset, rename the FS and other variables to different name, for example FS to FS1 if policy  = 1, and do not need to change the matching variable name.
2. After the joinby, generate the difference between FS and FS1, you may take the absolute value for the difference
3. bysort  EAR SIC2 DP (difference): keep if _n == 4

地板
sunny虾 发表于 2013-8-6 23:11:00
ctx5518 发表于 2013-8-6 08:37
1. When you create the two dataset, rename the FS and other variables to different name, for example ...
cheers~

7
索索~ 发表于 2015-5-20 16:48:10
ctx5518 发表于 2013-8-6 08:37
1. When you create the two dataset, rename the FS and other variables to different name, for example ...
可是这样joinby之后他们不在同一行中,如何进行做差呢

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

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2026-1-2 20:12