Dear All, Suppose that the data set is
For each `author' and `year', I'd like to calculate an H index.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int(year times) long author 2010 0 1 2010 0 1 2010 0 1 2010 0 1 2010 0 1 2010 0 1 2010 0 1 2010 0 1 2010 1 1 2010 1 1 2010 2 1 2010 2 1 2010 14 1 2010 0 2 2010 0 2 2010 0 2 2010 0 2 2010 0 2 2010 0 2 2010 3 2 2010 3 2 2010 7 2 2010 7 2 2010 12 2 2010 12 2 2011 0 1 2011 0 1 2011 0 1 2011 0 1 2011 1 1 2011 2 1 2011 3 1 2011 7 1 2011 8 1 2011 10 1 2011 0 2 2011 0 2 2011 0 2 2011 0 2 2011 2 2 2011 2 2 2011 3 2 2011 3 2 2011 6 2 2011 6 2 end
- For author=1 and year=2010, the number of the values of `times' greater than or equal to 1 is at least 1, then H=1. And The number of the values of `times' greater than or equal to 2 is at least 2, then H=2.
- For author=2 and year=2010, the number of the values of `times' greater than or equal to 1 is at least 1, then H=1. The number of the values of `times' greater than or equal to 2 is at least 2, then H=2. The number of the values of `times' greater than or equal to 3 is at least 3, then H=3. The number of the values of `times' greater than or equal to 4 is at least 4, then H=4, and so on. Any suggestions? Thanks.
Comment