Hello,
I am a new Statalist. I have a firm ID variable(Ticker), a string variable(NED consist of "yes" and "no"), and the year(year). I want to count the number of observations when NED indicates "yes" in each firm and each year. I want to exclude missing data in this case. Ideally I should generate a newvar named outsiders which gives me the total number of observations when NED is yes for every firm in each year. Appreciate any helps!
my data looks like this:
NED DirectorName RoleName Ticker year
No Ron Rose Chief Information Officer BKNG 2002
No Ron Rose Chief Information Officer BKNG 2003
No Ron Rose Chief Information Officer BKNG 2004
No Ron Rose Chief Information Officer BKNG 2005
No Stef Norden Executive Officer BKNG 2006
No Stef Norden Executive Officer BKNG 2007
No Trey Urbahn Division Chairman BKNG 2002
No Trey Urbahn Division President BKNG 2001
Yes Bill Ford III Director - SD BKNG 2000
Yes Bill Ford III Director - SD BKNG 2001
Yes Bill Ford III Director - SD BKNG 2002
Yes Craig Rydin Independent Director BKNG 2005
Yes Craig Rydin Independent Director BKNG 2006
Yes Craig Rydin Independent Director BKNG 2007
Yes Craig Rydin Independent Director BKNG 2008
Yes Craig Rydin Independent Director BKNG 2009
Yes Craig Rydin Independent Director BKNG 2010
Yes Craig Rydin Independent Director BKNG 2011
Related Posts with count total observations per firm per year
Diff-in-diff with time fixed effectsHi everyone, Maybe it is a trivial question but I am running a DID regression based on a dataset wi…
Panel data (i , j and t ) 2SLS using fixed effects when endogenous variable only varies over timeI have emissions data on c.1300 firms, over 10 years, across 27 EU countries. I am looking at the re…
Id variable stored in double formatHello Stata members, I am analysing dataset in which pid is stored in double format. Since I want t…
Extracting words from a string variable using a local listHello, I want generate a new varibale that display the words found in the string variable that matc…
Generating summarized variables for synthetic control predictorsHello, I am setting up a synthetic control based on data that looks something like this: cityid | ye…
Subscribe to:
Post Comments (Atom)
0 Response to count total observations per firm per year
Post a Comment