Hi all,
I am currently working on a dataset with different firms (name_std), different years (years_id), their granted patents (patent_id), and with a dummy variable (green_d) that equals 1 when the patent is a green patent.
What I now want is to generate a new variable that counts how many patents that a firm is granted in a given year is a green patent ( green_d = 1). Hence, it needs to count the number of green patents per year per firm.
Anyone that can help me with this, it would be much appreciated!
I am currently working on a dataset with different firms (name_std), different years (years_id), their granted patents (patent_id), and with a dummy variable (green_d) that equals 1 when the patent is a green patent.
What I now want is to generate a new variable that counts how many patents that a firm is granted in a given year is a green patent ( green_d = 1). Hence, it needs to count the number of green patents per year per firm.
Anyone that can help me with this, it would be much appreciated!
Comment