Hi all,
this is the first time I am writing in the statalist-forum and I would be very glad if somebody can help me.
I didn't find any hints how to cope with my case in the forum, so here is my request:
I do have a panel structure (long format) with companies like the following:
ID year var1 var2 var 3 ..... var20
1 2003 16% 12% 5% 0%
1 2004 15% 11% 7% 1%
1 2005 16% 14% 6% 3%
2 2003 27% 19% 4% 3%
2 2004 15% 11% 4% 3%
2 2005 19% 9% 3% 2%
What I'd like to compute is HHI -> Herfindahl-index for every Company (id) in each year.
Actually, I didn't find any helping hints if I can use this long format or if I have to reshape it to the wide format.
And if I use the command from stata-help-function in the existing format, stata produces a new hhi-variable for every var 1 to var20.
sort id year
hhi var1 var2 var3, by (id year)
Maybe my question is to easy, but nevertheless I did not find any hints on how to cope with.
So, I would be very pleased if somebody can help me.
Thanks a lot and kind regards
Fabian
this is the first time I am writing in the statalist-forum and I would be very glad if somebody can help me.
I didn't find any hints how to cope with my case in the forum, so here is my request:
I do have a panel structure (long format) with companies like the following:
ID year var1 var2 var 3 ..... var20
1 2003 16% 12% 5% 0%
1 2004 15% 11% 7% 1%
1 2005 16% 14% 6% 3%
2 2003 27% 19% 4% 3%
2 2004 15% 11% 4% 3%
2 2005 19% 9% 3% 2%
What I'd like to compute is HHI -> Herfindahl-index for every Company (id) in each year.
Actually, I didn't find any helping hints if I can use this long format or if I have to reshape it to the wide format.
And if I use the command from stata-help-function in the existing format, stata produces a new hhi-variable for every var 1 to var20.
sort id year
hhi var1 var2 var3, by (id year)
Maybe my question is to easy, but nevertheless I did not find any hints on how to cope with.
So, I would be very pleased if somebody can help me.
Thanks a lot and kind regards
Fabian
Comment