Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Computing Herfindahl-Hirschman index


From   Syed Basher <[email protected]>
To   [email protected]
Subject   st: Computing Herfindahl-Hirschman index
Date   Wed, 8 Dec 2010 03:11:34 -0800 (PST)

Dear Statalist,

I have the following (hypothetical) trade dataset which contains imported items by importer.

importer  | item1 item2..... item20
-----------------------------------
11        |  10      20        80 
12        |   5       7         9 
13        |           1        
14        |   2                 6
...       |
20        |   8       9

I would like to obtain the following table/data: 

importer  | item1      item2   .... item20
-------------------------------------------
11        |  1600     2921.84       7091.41 
12        |   400      357.92         89.75
13        |              7.30        
14        |    64                     39.88
...       |
20        |  1024      591.67


where, say, the value 1600 is obtained using the formula (si*100)^2, where si is the share of importer11 in item1 and is obtained using 10/25,   25 is the sum of all entries in item1. This will allow me to get the  Herfindahl-Hirschman index by importer for each item.

I hope any one of you can help. Thank you so mcuh.

Regards,

Syed Basher
Qatar National Food Security Program


      

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index