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
Issues using esttabHi All, I'm now trying to use esttab for generating the table: Could you please explain why I don't …
Using the egen commandHello, Statalist members, I am a new Stata user. I would like to count the total number from the fi…
Referring to the last Variable in A DatasetI'm working with Johns' Hopkins COVID-19 data. It comes in wide format and I must reshape it. The is…
Looping using list of var with similar prefixHi everyone! I'm getting stuck with something probably silly. I have a number of variables that sh…
Ivregress 2sls error "r(301)" last estimates not found.Hi everyone, I am using portable Stata 16. I need to run 2sls regression of y on x with instrument …
Subscribe to:
Post Comments (Atom)
0 Response to Counting yearly cumulative observations
Post a Comment