Dear Marteen,
Thank you for your reply. However, in order to use that command, I need to create the variable "quarter" using my "month" variable. I know how to do it the long way....but it may be something shorter. Thanks, Andres
________________________________________
From: owner-statalist@hsphsun2.harvard.edu [owner-statalist@hsphsun2.harvard.edu] on behalf of Maarten Buis [maartenlbuis@gmail.com]
Sent: 21 January 2013 15:32
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: create a new variable with quarterly average
bys quarter : egen m = mean(var)
Hope this helps,
Maarten
On Mon, Jan 21, 2013 at 3:11 PM, A.Silva-Montes <as454@kentforlife.net> wrote:
> Dear Statausers,
>
> I have monthly expenditure data (I already declared the time series dataset) and I want to create a new variable with the expenditure average by quarter and keep having monthly data (I mean I do not want to "collapse" the dataset). I can do it the long way....can someone help me with a shortcut (any specific stata command)?
>
> Thanks, Andres
> -- Kentforlife.net - the email service for alumni of the University of Kent
>
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
--
---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany
http://www.maartenbuis.nl
---------------------------------
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/
-- Kentforlife.net - the email service for alumni of the University of Kent
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/