Calculate industry concentration based on four biggest numbers
问题 I am trying to find the four biggest numbers of a variable in Stata, as I want to calculate the industry concentration of different groups based on sales. I have firms sales from multiple years and the firms belong to different groups based on industries and countries. Thus, I would like to find: industry concentration = (4 biggest sales-values of a year of one industry-&-country-group) / sum of all sales for one year of the industry-&-country-group) I have about 10000 firms for about 10