Hi all!
I am working with the dataset in the attachment.
The data in the variable appln_id are American patents that are classified as green.
Therefor the variable Green_patent indicates a 1.
gvkey is the unique company identifier.
The data is from 2009, 2010, 2011, 2012 and 2013.
Now I would like to know how many Green patents a company has cumulative per year.
So in 2009 only the number of 2009 but in 2010 the number of 2009 and 2010 and so on.
Do you know how I could approach this?
Thank you so much in advance!
Kind Regards,
Jos van WeerenArray
Related Posts with Counting yearly cumulative observations
why the frequency of variables would not change after winsorized?Unlike the trim, which remove the extreme data, the winsor function would replace the extreme data (…
Need help figuring out this commandHi! I need help with a question on my stats homework and I cannot figure out how to set up this comm…
wide to long formatDear All, I have this data set Code: * Example generated by -dataex-. For more info, type help data…
time dummies always should be included in iv part in xtabond2?I am now trying to implement xtabond2 for my panel data set spanning from 1998 to 2020. The issue th…
Generating a variable that counts the appearance of a particular value in rolling bases (across rows) Dear Statalist, I am having some difficulties in creating a variable I need. I would greatly a…
Subscribe to:
Post Comments (Atom)
0 Response to Counting yearly cumulative observations
Post a Comment