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: converting weekly to monthly data
From
Stef Salvez <[email protected]>
To
[email protected]
Subject
Re: st: converting weekly to monthly data
Date
Thu, 28 Jun 2012 20:17:03 +0200
I have a similar question. I want to convert values that represent 4
weeks averages to montly averages. Is there a way to do that?
thanks
On 6/28/12, tashi lama <[email protected]> wrote:
> there isn't a machinery to change weekly to monthly directly. However, you
> could change weekly into daily first and then montly from daily. May be sth
> like this...
>
>
>
> gen daily=dofw(tw)
>
> format daily %td
>
> gen monthly=mofd(td)
>
> format monthly %tm
>
>
>
> Alternatively, you could also do
>
>
>
> gen monthly=mofd(dofw(tw))
>
> format monthly %tm
>
>
>
> The codes aren't tested. For more on stata data.... help date in command
> window
>
>
>
> Hope it helps,
>
> Tashi
>
> ----------------------------------------
>> From: [email protected]
>> To: [email protected]
>> Subject: st: converting weekly to monthly data
>> Date: Thu, 28 Jun 2012 17:37:27 +0000
>>
>> hii all i got weekly sales data that i need to convert to monthly, but iam
>> not sure how to do this, as the number of weeks in a month is not exactly
>> 4
>> can any one help
>> my data looks like this
>>
>> 2010 week 1 7677
>> 2010 week 2 5466
>> 2010 week 3 6776
>> ..
>> 2010 week 53 7774
>>
>>
>>
>> 2011 week 1 4567
>> ...
>> 2011 wek 52 4990
>>
>> thanks inadvance
>>
>> *
>> * 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/
> *
> * 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/
>
*
* 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/