Dear Nick,
I meant that I was too close to find HHI for my class variable. I did it with a tag function. But tag does not report how many times a distinct value is being repeated, it only reports whether or not a value appears in the group before the focal observation which made my results for HHI wrong. I thought that the logic of this approach was close to Daniel's. Therefore, I found your warning ("If all categories are represented in all groups, then that would work") so relevant to my approach.
How tag does:
What do I need to find HHI?
Question here is: Is there any function in Stata which gives me a count how many times a distinct value is being repeated in the group?
Best regards, Farid
I meant that I was too close to find HHI for my class variable. I did it with a tag function. But tag does not report how many times a distinct value is being repeated, it only reports whether or not a value appears in the group before the focal observation which made my results for HHI wrong. I thought that the logic of this approach was close to Daniel's. Therefore, I found your warning ("If all categories are represented in all groups, then that would work") so relevant to my approach.
How tag does:
Firm | year | class | tag |
Firm A | 2000 | 105 | 1 |
Firm A | 2000 | 107 | 1 |
Firm A | 2000 | 107 | 0 |
Firm A | 2000 | 107 | 0 |
What do I need to find HHI?
Firm | year | class | Any function |
Firm A | 2000 | 105 | 1 |
Firm A | 2000 | 107 | 3 |
Firm A | 2000 | 107 | 0 |
Firm A | 2000 | 107 | 0 |
Best regards, Farid
Comment