Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: how to generate mean for a secquence of five year of a variable


From   Nick Cox <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   RE: st: how to generate mean for a secquence of five year of a variable
Date   Thu, 5 May 2011 15:18:40 +0100

Still ambiguous: blocks or moving? 

Nick 
[email protected] 


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of prakash singh
Sent: 05 May 2011 14:54
To: [email protected]
Subject: Re: st: how to generate mean for a secquence of five year of a variable

Dear Oliver here is what I want

yearid	countryid	var1	var2	
1980	1	7.25	
1981	1	8.25		
1982	1	9.5		
1983	1	7.5		
1984	1	7.75	8.05 (mean of first five observation of var1)
...........................................
........................................
2001	1	8.25		
2002	1	9		
2003	1	9.5		
2004	1	8		
2005	1	10	8.95 (mean of last five observation of var1)

similarly for all other country.



*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index