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
Long-run coefficient estimation for fixed-effects modelDear list members, I have an unbalanced long T dataset (38 quarters), and running a fixed-effects m…
Generate random integersHello Listers i want to make a mock dataset i would like to generate 2 integers at random 1) eithe…
Syntax for the * commentStata has two types of single-line comments: // and *. The comment // has identical syntax to the on…
How to drop specific observations from dataset in Stata?Hello, I have a large dataset but I do not need all observations. The dataset contains data for eve…
Stata Journal cumulative author indexThe Stata Journal has now completed publishing volume 20. The journal's contents are searchable on R…
Subscribe to:
Post Comments (Atom)
0 Response to Calculating MHHI with triple summation
Post a Comment