rename 资产总计 Asset
rename 营业收入 REV
rename 固定资产净额 PPE
rename 应收账款净额 REC
rename 净利润 NI
rename 经营活动产生的现金流量净额 CFO
xtset id year
gen TA = NI - CFO // 总应计利润
gen A1 = 1/L.Asset // 总资产倒数
gen DREV = D.REV // 营业收入增量
gen DREC = D.REC // 应收账款增量
gen DREV_DREC=DREV-DREC
gen ROA=NI/((Asset+L.Asset)/2) //ROA
*********
foreach v in TA DREV_DREC PPE DREV DREC {
replace `v' = `v'/L.Asset
}
drop 报表类型 会计期间 负债合计 营业总收入 其他业务收入 利润总额 所得税费用
save example2.dta, replace
drop if TA + A1 + DREV + PPE == .
bysort id:drop if _N<6
******
statsby, by( id) clear: reg TA A1 DREV PPE, noconstant
merge 1:m year id using example2.dta
*******
这个只能算出来公司的单一盈余管理,怎么计算每一年公司的盈余管理数值呢? 如果在加上 by(id year)则一直出现红叉请问这是什么原因呢?
command: regress TA A1 DREV PPE, noconstant
by: year id
Statsby groups
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 50
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 100
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 150
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 200
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 250
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 300
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 350
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 400