--It seems this email did not get through yesterday and I am sending it
again, sorry for that--
Thanks a lot Scott and Nick for your very helpful suggestions. My previous
do-file tried in fact to create a variable -idfifth- that identifies groups
of 5-years in a setting of 42 years by country. This is indeed what Nick's
suggestion nicely achieved with -egen, seq- that I did not know. The next
step is then to just generate my 5-years averages using -egen, mean- as
follow ******bysort id idfifth: egen m`var' = mean(`var')**** for each of my
variable of interest.
This gives me then a "5 independent years groups averages", but now I am
confused after Scott's comments and need to check out the FAQs on moving
averages to make sure that this is not what I need.
Thanks again
Adama
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/