Dear Statalist Forum Users,
I have the following panel data:
I need to create new variables (Asia, Europe, US) that calculate the mean of regional values for every year. I have trouble in creating these variables. I would highly appreciate your guidance on this.
Looking forward to hearing from you.
Kind regards,
Firangiz
I have the following panel data:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str6 region int year double value "Asia" 1969 .8525122404098511 "Asia" 1969 1.03 "Europe" 1971 .8506529331207275 "Europe" 1971 .9506529331207275 "US" 1973 1.0506529331207275 "US" 1973 1.1506529331207276 "Asia" 1969 1.2506529331207277 "Asia" 1969 1.3506529331207278 "Europe" 1972 1.4506529331207279 "Europe" 1972 1.550652933120728 "US" 1973 1.650652933120728 "US" 1974 1.7506529331207281 "Asia" 1970 1.8506529331207282 "Asia" 1970 1.9506529331207283 "Europe" 1973 2.050652933120728 "Europe" 1973 2.1506529331207283 "US" 1973 2.2506529331207283 "US" 1973 2.3506529331207284 end
Looking forward to hearing from you.
Kind regards,
Firangiz
Comment