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

Re: st: Re: question on looping


From   Aaron Li <[email protected]>
To   [email protected]
Subject   Re: st: Re: question on looping
Date   Wed, 12 Oct 2005 08:29:35 -0500

Thanks so much! My dataset, however, not only have time gaps but also
may have more than one observation for a single time period. I cannot
sum them up. What can I do in this case?

Aaron

On 10/12/05, Kit Baum <[email protected]> wrote:
> 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/
>

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index