Hello,

I have a problem creating Herfindahl-Hirschman Index for my data I tried scc install hhi but it doesn't give a clear result

this is how my table looks like

Loan Firms Percentage
1 A 55
1 B 33
1 C 17
2 B 100


I want The Herfindahl to be calculated using each syndicate member’s share in the loan; and varies from zero to 10,000, with 10,000 being the Herfindahl when a lender holds 100% of the loan

I want the results to look like this

Loan Firms Percentage hhi
1 A 55 2500
1 B 33 1089
1 C 17 289
2 B 100 10000


any Ideas on what command should I use to make it look like this?