Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: 5-years period averages

From   [email protected]
To   [email protected]
Subject   st: 5-years period averages
Date   Tue, 28 Oct 2003 20:27:42 +0100 (MEZ)

--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

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index