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
How to identify when a treatment switches between 0 and 1 multiple time in the sample periodDear All ! I have a panel of states. In my data set, I have a dummy variable (treat) such that: trea…
Calculating response rates to surveysDear all, I have a project which sends surveys to participants based on certain events. I would li…
panel var _are the lags and D.variable working same?Dear members, I am struggling in modeling a panel data with lag variables in Stata. I would like so…
Standard Deviation CodeHi I plan t analyzed the data from ELISA using Stata. The data contain OD_1 and OD_2. OD_1 and OD_1 …
Testing mediation model in stata when the dependent variable is multinomialHi all, I am testing a mediation model. I want to calculate the direct and indirect effects of the …
Subscribe to:
Post Comments (Atom)
0 Response to Herfindahl-Hirschman Index, command ignores existing values
Post a Comment