Hello!
I am a PhD student in International Business and Economics. I am studying MNEs. I would like to create the Herfindahl-Hirschman index to see how concentrated are MNEs around the World. Since I had no other sophisticated method to do that I created a separate variable for the market share, having many variables now.
I have panel data which is balanced between 2007-2014, with approximately 12000 observations. I have a variable for each country that counts the number of subsidiaries, if there are no subsidiaries in a country the value is 0. Using the previous variable I created a variable for the share of each country which is 'Nr of subsidiaries in Country1/Total number of subsidiaries', which is 0 if in that country there are no subsidiaries. There are 196 countries in the data.
My command to calculate the HHI is
gen HHI=Country1share^2 + Country2share^2 + ... + Country196share^2
When I run this command it returns only 400 values, and the rest is missing. I checked the command, I tried to compare those rows where the index is calculated with those where it is not, but I cannot find the reason that Stata ignores existing values. I should have a value for all 12.000 observations.
Before the command returned only missing values without any error message. Now that I replaced with 0 all the values where the country did not have a subsidiary (previously they were just missing) the command returns 400 values. I tried to search for the issue when the command leaves out values, but I only find the basic topics on missing data.
I am really looking forward to any suggestion that could help, thank you for your kind attention!
0 Response to Herfindahl-Hirschman Index, command ignores existing values
Post a Comment