Note that what (some) economists know as
the Herfindahl index
* is known as the Simpson index (coefficient,
whatever) by ecologists
and
* is one of those measures known by statisticians and some
others as the Gini index (coefficient, ...)
-- subject to some people calculating the complementary
probability.
Hence various programs already exist to do what
you want, not that undermines any calculation
from first principles.
This is orthogonal to Austin's concerns.
Nick
[email protected]
austin nichols
> You should read the help for genearate and egen, but before you can
> implement the right commands, you will also want to nail down the
> definition of the HHI:
>
> egen double sasset=sum(asset), by(state year)
> bysort state year: g double shsqrd= (asset/sasset)^2
> egen double HHI=sum(shsqrd), by(state year)
>
> The above will be valid if you have a balanced panel. Have you
> thought about what to do for firms that enter or exit the panel, or
> are missing data for intermediate years?
Dawood Ashraf
> I am trying to calculate degree of concentration in an
> industry by using the
> Herfindahl index. I am using the panel data where I have 10
> years of time, 50
> states, in every state there are a few companies.
>
> bysort state: generate HERF= (asset/ sum(asset))^2 if repdte==1997
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/