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: create a new variable with quarterly average
From
"A.Silva-Montes" <[email protected]>
To
"[email protected]" <[email protected]>
Subject
RE: st: create a new variable with quarterly average
Date
Mon, 21 Jan 2013 15:25:17 +0000
Sorry about the misspelling and thank you for your help (to both).
Regards, Andres
________________________________________
From: [email protected] [[email protected]] on behalf of Nick Cox [[email protected]]
Sent: 21 January 2013 16:18
To: [email protected]
Subject: Re: st: create a new variable with quarterly average
First note that Maarten's name is indeed Maarten. He's a very helpful
person, but he doesn't like his name being mis-spelled.
Second, why not try working this out for yourself? -help dates and
times- tells you that there a call -qofd(dofm())- that maps months to
days and days to quarters.
Nick
On Mon, Jan 21, 2013 at 3:04 PM, A.Silva-Montes <[email protected]> wrote:
> 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: [email protected] [[email protected]] on behalf of Maarten Buis [[email protected]]
> Sent: 21 January 2013 15:32
> To: [email protected]
> 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 <[email protected]> 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)?
>>
*
* 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/