Hi everybody!
I'm looking to create a Modified Herfindahl-Hirschmann Index (MHHI) in STATA from the attached formula. It creates a market index that also take into account cross ownership of the companies in the sector. I have all the variables I need to execute the formula, I just simply have no idea how to do it in STATA.
At first I thought is should use loops to make STATA go through each company (as the formula describes) but i don't know how to make STATA aware of the relationship between the owners and companies, creating that kind of sumproduct that the formula prescribes for each owner in the company.
All inpust will be well appreciated!
Below is a some of my sample data (highlighted is the name of the variable in the formula):
input byte(Company_number_j Owner_number_i) double(Owner_share_gamma Market_Share_s)
1 1 .29 .2996783902352667
1 2 .12 .2996783902352667
1 3 .29 .2996783902352667
1 4 .29 .299678390235267
2 5 .5 .0466357542171158
2 5 .5 .0466357542171158
3 1 .29 .48362543478072323
3 2 .12 .48362543478072323
3 3 .29 .48362543478072323
3 4 .29 .48362543478072323
4 6 .05 .17006042076689426
4 7 .11 .17006042076689426
4 8 .73 .17006042076689426
4 9 .11 .17006042076689426
The formula:
Array
K is the other companies and therefore when j=1, k=2 then 3 then 4
The formula requires a triple summation but i think breaking it down into single summations will be an advantage.
Related Posts with Calculating MHHI with triple summation
How to specifiy dummy variables/ exporting multiregression to word document?Array So I'm running a multiregression on the effect that age plays on duration of unemployment. …
Ordered Probit PostestimationDear all Stata users, I have been trying to do postestimation for a ordered probit model for each o…
merging variableshello. How do i merge a single variable from a using data set to the main data set? …
How to drop year observations from a variableI am using V-dem version 6. In the year variable, observations begin from 1789. I want to use 'drop'…
Repeated Measures ANOVAHi, I would like to know how to do the repeated measures ANOVA analysis with the following data - I …
Subscribe to:
Post Comments (Atom)
0 Response to Calculating MHHI with triple summation
Post a Comment