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!
Related Posts with Herfindahl-Hirschman Index, command ignores existing values
Firm fixed effects with reghdfeHi statalist community, I am working with a dataset that looks like this: Code: input float(abs_DA…
Rescaling the variableHi, I am interested in rescaling the variable which ranges from -2.5 to 2.5 I want to rescale int…
Statistical Area fixed effectsHi, I am trying to control for the CBSA (a statistical area) in my dataset. To do this I think I wo…
Can I restore previously closed ado files when I restart the Stata?Dear friends, can we restore previously closed ado files when we restart the Stata? Thank you in adv…
Creating interactions of independent variable with industry and year dummiesDear Stata Users, Can you please help me with the following issue. How can I include interactions o…
Subscribe to:
Post Comments (Atom)
0 Response to Herfindahl-Hirschman Index, command ignores existing values
Post a Comment