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

st: Re: question on looping


From   Kit Baum <baum@bc.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: Re: question on looping
Date   Wed, 12 Oct 2005 08:02:55 -0400

findit mvsumm

Kit Baum, Boston College Economics
http://ideas.repec.org/e/pba1.html


On Oct 12, 2005, at 2:33 AM, Aaron wrote:

Is there a smart way to calculate the standard deviation of var1 for
each id in each year, based on past 5 years' data. For example, for id
18 in year 1996, i want to calculate the st dev of var1 for the past 5
years 1991-1995 (here 3 data points). then, for id 18 in year 1998, i
want the st dev for var1 for the past 5 years 1993-1997; and then year
2000; and next id, and so on.... i have a large number of id's and
year's. many thanks,  aaron.

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



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