Dear all,
I have a little problem with creating averages across countries
suppose I have data in the following format
I want to create avgerages across countries. I have 25 countries, so it would be feasible to create names for fountries manually. but I have 160+ company, so summing across them manually would take a lot of time. Probably this is not the ideal way of approaching this problem I guess, but I am not sure how else to do it.
Any advice is appreciated!
Best,
Harvey
I have a little problem with creating averages across countries
suppose I have data in the following format
Code:
date name country ret 01.10.20001 company1 UK 0.01 .... 30.10.20001 company1 UK 0.02 01.10.20001 company2 UK 0.04 .... 30.10.20001 company2 UK 0.01 01.10.20001 company3 US 0.03 .... 30.10.20001 company3 US 0.02 is there a way to have Stata compute the following: 01.10.20001 UnitedKingdom UK (0.01+0.04)/2 .... 30.10.20001 UnitedKingdom UK (0.02+0.01)2 01.10.20001 USA US 0.03 .... 30.10.20001 USA US 0.02
I want to create avgerages across countries. I have 25 countries, so it would be feasible to create names for fountries manually. but I have 160+ company, so summing across them manually would take a lot of time. Probably this is not the ideal way of approaching this problem I guess, but I am not sure how else to do it.
Any advice is appreciated!
Best,
Harvey
Comment