Hi all,
I have a large dataset of patents that were filed in the period of 1980 till 2009. This dataset is characterised by the patnumbers, permno (company id), fileyear, filedate and class.
I am having problems generating a command to count how many times a specific "class" occurs in a year compared to the years before by permno (company id). I would like to create a new variable UNIQCLASS that counts how many new patent classes a company files in a year. I first tried to generate a command that would compare the class of the patent and look whether this specific class was already filed by the company in the previous dates. If it was not filed in the previous dates to identify it as unique. Then to generate a new variable that counts these unique patents per year. However, my attempts did not workout, since i do not know how to incorporate the conditional to compare it with the previous dates. Is there any way that i can do this? If someone has any idea, I would really appreciate any suggestions.
patnum filedate idate permno class subclass ncites fyear
3071251 "1/4/1960" "1/1/1963" "" 10006 "210" "349000O" 7 1960
3086757 "1/5/1960" "4/23/1963" "" 10006 "261" "034200O" 8 1960
3082875 "1/11/1960" "3/26/1963" "" 10006 "210" "416400O" 6 1960
3135857 "1/11/1960" "6/2/1964" "" 10006 "219" "124340O" 17 1960
Thank you in advance!!
Kind Regards,
Leidy
I have a large dataset of patents that were filed in the period of 1980 till 2009. This dataset is characterised by the patnumbers, permno (company id), fileyear, filedate and class.
I am having problems generating a command to count how many times a specific "class" occurs in a year compared to the years before by permno (company id). I would like to create a new variable UNIQCLASS that counts how many new patent classes a company files in a year. I first tried to generate a command that would compare the class of the patent and look whether this specific class was already filed by the company in the previous dates. If it was not filed in the previous dates to identify it as unique. Then to generate a new variable that counts these unique patents per year. However, my attempts did not workout, since i do not know how to incorporate the conditional to compare it with the previous dates. Is there any way that i can do this? If someone has any idea, I would really appreciate any suggestions.
patnum filedate idate permno class subclass ncites fyear
3071251 "1/4/1960" "1/1/1963" "" 10006 "210" "349000O" 7 1960
3086757 "1/5/1960" "4/23/1963" "" 10006 "261" "034200O" 8 1960
3082875 "1/11/1960" "3/26/1963" "" 10006 "210" "416400O" 6 1960
3135857 "1/11/1960" "6/2/1964" "" 10006 "219" "124340O" 17 1960
Thank you in advance!!
Kind Regards,
Leidy
Comment