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
Tagging neighborhood houses within timeframeI have a dataset with property ID, longitude, latitude, listing date and closing date (sale of prope…
Vertical LabelsHello, How do I get the x-axis labels or in this case YearMonth to be vertical? Code: label var na…
How to merge two datasets (string and integer values in ID)Dear all, I have two datasets: household and individual data. Usually, it is quite straightforward t…
Missing values when I run regression analysisHi, I am running the following program Regression analysis for predictors of ICU admission(icu) aga…
Too many predictors when using Time fixed effects for panel dataHello, I am running an xtreg-fe cluster(panelvar) on monthly data. I employ time-fixed effects too. …
Subscribe to:
Post Comments (Atom)
0 Response to count total observations per firm per year
Post a Comment