Dear Statalist participants,
Below I give a part of my dataset. It is related with nace2 classification of industrial sectors and their HHIs(market concentration levels). But unfortunately they are published in 4 digits level (like 0610) and I need for 3 digit's value (like 061). Now I try to convert (take average) HHI's of subsectors ( ex. 0811 and 0812) to main sectors (ex. 081). As you see, the subsectors of main sectors with three digits are in an irregular size, that is, some main sectors have two subsectors others have only one, others have seven etc. I attemted to take average with "for loops" but I could not manage. How can I do that with my large dataset without manually calculating and entering the data which would take huge amount of my time!! Thank you for your interest in advance.
Demet.
nace2 HHI
061
0610 .5854457791
062
0620 .4798563569
071
0710 .2199852131
072
0729 .1103154682
081
0811 .0111453791
0812 .0102862714
089
0891 .6843208716
0892 .1855210554
0893 .3512744743
0899 .0748194056
Below I give a part of my dataset. It is related with nace2 classification of industrial sectors and their HHIs(market concentration levels). But unfortunately they are published in 4 digits level (like 0610) and I need for 3 digit's value (like 061). Now I try to convert (take average) HHI's of subsectors ( ex. 0811 and 0812) to main sectors (ex. 081). As you see, the subsectors of main sectors with three digits are in an irregular size, that is, some main sectors have two subsectors others have only one, others have seven etc. I attemted to take average with "for loops" but I could not manage. How can I do that with my large dataset without manually calculating and entering the data which would take huge amount of my time!! Thank you for your interest in advance.
Demet.
nace2 HHI
061
0610 .5854457791
062
0620 .4798563569
071
0710 .2199852131
072
0729 .1103154682
081
0811 .0111453791
0812 .0102862714
089
0891 .6843208716
0892 .1855210554
0893 .3512744743
0899 .0748194056
Comment