悬赏 10 个论坛币 已解决
大家好,
想问一下大家如果我要生成一个dummy variable, 是为了检测CEO 和chairman 是否是同一个人,我应该怎么设置变量呢?
我根据一些文章的得到的定义是:
CEO/chair duality (DUAL) which as defined by a dummy variable that takes the value of 1 if the board chairman serves as CEO at the same time; 0 otherwise.
另外,就是我想设置一个变量是firm age.
它的定义是:This variable was measured as a natural log of the number of years since the firm’s foundation
但是我在conpustat中导出的数据,不知道是从公司成立开始还是公司上市开始的年份.
希望大家可以帮助一下,谢谢大家!
最佳答案
15760043754 查看完整内容
第一个问题:假设你的ceo和chairman都是两个不同哑变量,同时再假设是ceo为1,是chairman为1,代码如下:
gen dual = 0
replace dual = 1 if ceo ==1 & chairman ==1
第二个问题:成立