Hi Guys,
I'm currently writing my thesis about the influence of the tenure of outside directors on earnings quality. Within this subject, I also want to investigate whether companies of which one of the outside directors has financial expertise show a different effect in relation to the earnings quality. I have broken down a sample of companies from the USA in the period from 2010-2019 with several outside directors per company year and I want to use a dummy variable that shows the value of 1 as soon as at least one outside director has financial expertise in a company year. I have currently created the following do file to create this dummy variable:
gen OUTSIDE = 0
replace OUTSIDE = 1 if (classification=="I")
drop if OUTSIDE == 0
gen cusip_6d = substr(CUSIP, 1, 6)
drop CUSIP
gen Financial_Expertise = 0
replace Financial_Expertise = 1 if Financial_Expert == "Yes"
sort cusip_6d year
duplicates drop cusip_6d year, force
I have attached a snap of the cleansed data which is generated after implementing the do-file. As you can see you get to see a dummy variable but it occasionally indicates a value of 0 while in that company-year there is indeed an outside director with financial expertise. This is for example the case for the first dummy-variable of AAON.
Do you guys have any idea how I can adjust my do-file so that the dummy variable shows a 'correct' value in terms of the presence of a financial expert per company year?
I would love to hear from you and thank you in advance
Kind Regards,
Roy
Related Posts with Dummy Variable Financial Expert with Panel Data
Error Using the Command 'using'Hello everyone, I just downloaded data from PSID. Every time I run the do.file that comes with the …
Should I rename all the variables with the year immediately following the original variable names when I merge data across years with loopI run the following code: local i = 1998 while `i' < 2007{ local j=`i'+1 **step 10: match by …
Tokenize and looping through tokensHi Statlist, I have the following problem. I have defined 3 local variables defining the path to so…
Heckman selection model in three stagesDear Statalist, I hope you are well. Please, I would like to ask regarding the Heckman selection mod…
Issues with Lincom commandHello, I posted this question a few days ago, and I am trying to use the lincom command to find the …
Subscribe to:
Post Comments (Atom)
0 Response to Dummy Variable Financial Expert with Panel Data
Post a Comment