楼主: pange78
6105 5

[数据管理求助] 年度间会计师事务所变化为1,否则为0,如何写程序? [推广有奖]

  • 3关注
  • 1粉丝

已卖:250份资源

本科生

89%

还不是VIP/贵宾

-

威望
0
论坛币
178 个
通用积分
1.6002
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
596 点
帖子
44
精华
0
在线时间
177 小时
注册时间
2010-10-8
最后登录
2016-12-15

楼主
pange78 发表于 2014-2-16 10:24:08 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
求助:同一公司如审计师事务所年度间发生变化为1,否则为0,怎么写程序。我用tab audifirm,gen(aud)生成虚拟变量后,不知道怎么判断发生变化了(无法达到母的),或者是有别的方法,谢谢了。注会计师事务所很多家


二维码

扫码加我 拉你入群

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

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

关键词:会计师事务所 如何写 会计师 事务所 虚拟变量 会计师 事务所 审计师 程序 如何

沙发
jjjj6666 发表于 2014-2-16 11:32:37
one approach is to generate a numerical id variable, naudifirm, for each audifirm, then use
egen x=std(naudifirm), by(company)

if x!=0 the company has different audifirm across year, otherwise, has the same audifirm.

藤椅
pange78 发表于 2014-2-16 14:53:27
十分感谢,太强了

板凳
pange78 发表于 2014-2-16 15:19:21
本来就有变量code区别公司的,但一个公司每年度审计的公司(audfirm)可能不同,用你给的命令还是没有办法判定这个公司t-1年与t年的审计公司不同为1,相同为0啊,亲
请再次执教,谢谢

报纸
pange78 发表于 2014-2-16 15:23:07
审计公司是字符型数据,包括200多家公司的名称,code是数值型数据

地板
jjjj6666 发表于 2014-2-16 22:54:27
if the standard deviation of audfirm is 0 for a a company across years, the company has the same audfirm.  Do you want to see if the company has the same audfirm between two consecutive years or across all years?  To see by consecutive years, do

sort company year
gen x=1 if audifirm!=audifirm[_n-1] & company==company[_n-1]
replace x=0 if x==.
已有 1 人评分热心指数 收起 理由
暮无仇 + 1 精彩帖子

总评分: 热心指数 + 1   查看全部评分

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

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