Statalist


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

st: Monthly observations to quarterly averages


From   David Musselwhite <david.musselwhite@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Monthly observations to quarterly averages
Date   Wed, 1 Jul 2009 13:32:08 -0400

Hi Statalisters,

I have a dataset of unemployment rates by state by month and would like to convert these into quarterly averages, so I'd like to take the mean of every three observations and store it as a separate variable.

AK  99   Oct     0
AK  99   Nov   5
AK  99   Dec   10

would yield a value of 5, tied to that quarter. I'm imagining that collapse is the command I want to use, but am having trouble finding an example of this kind of process.

Thanks for your help,
David Musselwhite
Cornell University
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index