Dear Profs and Colleagues,
The question is" The demographic index is built from the intersection of gender and age quartiles".
The Herfinadl index should be by firm i (firm id NPC_FIC) and time t (2010-2019)
sexo is gender. I am confused about how to make the intersection of gender and age quartiles and make HHI.
Any help is appreciated.
cheers,
Paris.
The question is" The demographic index is built from the intersection of gender and age quartiles".
The Herfinadl index should be by firm i (firm id NPC_FIC) and time t (2010-2019)
Code:
* Example generated by -dataex-. For more info, type help dataex clear input double(year NPC_FIC sexo) float age_group 2010 500000001 2 4 2010 500000001 2 3 2010 500000001 2 3 2010 500000002 1 2 2010 500000002 1 4 2010 500000002 1 4 2010 500000002 1 2 2010 500000033 2 3 2010 500000033 1 2 2010 500000050 1 2 2010 500000050 1 3 2010 500000083 2 1 2010 500000104 2 4 2010 500000119 1 2 2010 500000119 1 3 2010 500000119 1 2 2010 500000119 1 2 2010 500000119 1 2 2010 500000119 2 3 2010 500000119 2 2 2010 500000119 2 2 2010 500000121 1 3 2010 500000121 1 4 2010 500000156 1 1 2010 500000156 1 3 2010 500000157 2 3 2010 500000157 2 1 2010 500000157 2 2 2010 500000157 2 3 2010 500000165 1 3 2010 500000165 1 2 2010 500000180 1 2 2010 500000198 2 2 2010 500000198 2 3 2010 500000201 2 3 2010 500000204 1 3 2010 500000212 1 3 2010 500000215 2 2 2010 500000215 2 2 2010 500000215 2 1 2010 500000215 2 3 2010 500000240 2 3 2010 500000240 1 3 2010 500000276 1 1 2010 500000279 2 1 2010 500000284 1 3 2010 500000284 1 4 2010 500000284 1 3 2010 500000284 2 2 2010 500000305 2 2 2010 500000324 2 1 2010 500000341 1 1 2010 500000341 1 2 2010 500000346 1 1 2010 500000346 1 1 2010 500000346 1 2 2010 500000346 1 1 2010 500000346 2 1 2010 500000376 2 3 2010 500000376 2 4 2010 500000376 2 4 2010 500000376 2 3 2010 500000376 2 4 2010 500000376 2 3 2010 500000395 1 3 2010 500000395 2 1 2010 500000395 2 3 2010 500000395 2 1 2010 500000395 2 1 2010 500000465 2 3 2010 500000465 2 2 2010 500000465 2 3 2010 500000470 2 1 2010 500000470 2 2 2010 500000478 1 1 2010 500000525 2 2 2010 500000543 2 4 2010 500000543 2 4 2010 500000565 2 2 2010 500000583 2 4 2010 500000583 2 3 2010 500000600 2 4 2010 500000600 2 4 2010 500000633 1 2 2010 500000633 1 2 2010 500000675 2 4 2010 500000709 2 4 2010 500000748 2 2 2010 500000757 2 3 2010 500000761 2 3 2010 500000761 2 2 2010 500000761 2 3 2010 500000761 2 2 2010 500000765 1 4 2010 500000765 1 3 2010 500000766 1 3 2010 500000766 1 3 2010 500000774 1 3 2010 500000791 1 2 2010 500000791 1 1 end label values sexo sexo label def sexo 1 "Homem", modify label def sexo 2 "Mulher", modify . tab age_group age_group | Freq. Percent Cum. ------------+----------------------------------- 1 | 5,268,361 20.39 20.39 2 | 8,205,795 31.76 52.15 3 | 7,745,231 29.98 82.13 4 | 4,616,770 17.87 100.00 ------------+----------------------------------- Total | 25,836,157 100.00 . tab sexo Sexo | Freq. Percent Cum. ------------+----------------------------------- Homem | 13,806,906 53.44 53.44 Mulher | 12,029,251 46.56 100.00 ------------+----------------------------------- Total | 25,836,157 100.00
Any help is appreciated.
cheers,
Paris.