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
How to create variable of relative change?Dear experts, I have a dataset including monthly observations from June 2017 - June 2019, where I w…
Annualising coefficients in a loopHi all, I am currently working on project about volatility timing. The data I am working with is dai…
Dropping all panel observations if any one of them have missing value for any one of the variablesHi there, I have a firm-level data for two years. I want to drop a firm entirely (both years' obser…
Rolling standard devI have an unbalanced panel dataset with many (15000+) firms and their daily stock returns from 1960-…
Creating Mills RatiosHi all, This is my first post here so I apologise in advance if I've broken any rules, and I also a…
Subscribe to:
Post Comments (Atom)
0 Response to Counting yearly cumulative observations
Post a Comment