楼主: seaswallowxue
1211 0

[数据管理求助] 匹配样本时出错,求大神帮忙看看问题在哪里 [推广有奖]

  • 0关注
  • 0粉丝

硕士生

47%

还不是VIP/贵宾

-

威望
0
论坛币
999 个
通用积分
0.8500
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
589 点
帖子
45
精华
0
在线时间
271 小时
注册时间
2009-3-2
最后登录
2023-12-9

楼主
seaswallowxue 在职认证  发表于 2018-8-7 13:00:01 |AI写论文
5论坛币
forval i=1(1)`N'{
di "`i' of `N' loops completed"
drop _all
use "D:\stata13 (解压后直接打开即可)\soe.dta"
qui keep if year==scalar(private[`i',2])
qui keep if SIC12==scalar(private[`i',3])
gen asset_ratio=abs(asset/scalar(private[`i',5])-1)
qui keep if asset_ratio<0.15

if _N <1 {
continue
}
sort asset_ratio firm_id
qui keep if _n==1
local firm_id1=scalar(private[`i',1])
local year1=scalar(private[`i',2])
local firm_id2=firm_id[1]
local year2=year[1]
post match (`firm_id1')(`year1')(1)(`i')
post match (`firm_id2')(`year1')(0)(`i')

}
postclose match
报错:
unknown function ()
post:  above message corresponds to expression 1, variable firm_id
r(133);


关键词:completed Complete Private Stata13 Scalar

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

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