Convert ytd data to monthly data

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

spaceniuzai
Posts: 6
Joined: Tue Aug 31, 2010 6:28 am

Convert ytd data to monthly data

Postby spaceniuzai » Tue Aug 31, 2010 6:40 am

I have a series which is cumulative monthly data (that is, Jan is Jan's data, Feb is the sum of Jan and Feb, and so on). What is the best way to convert it to non-cumulative monthly data? Thanks.

Also, a separate question: what is the command in Eviews to create a index, say Jan 2006=100? Thanks so much.

trubador
Did you use forum search?
Posts: 1520
Joined: Thu Nov 20, 2008 12:04 pm

Re: Convert ytd data to monthly data

Postby trubador » Tue Aug 31, 2010 8:00 am

I have a series which is cumulative monthly data (that is, Jan is Jan's data, Feb is the sum of Jan and Feb, and so on). What is the best way to convert it to non-cumulative monthly data?
series z = d(your_series)
z(1) = your_series(1)
what is the command in Eviews to create a index, say Jan 2006=100?
series z_ind = 100*your_series/@elem(your_series,"2006M01")

spaceniuzai
Posts: 6
Joined: Tue Aug 31, 2010 6:28 am

Re: Convert ytd data to monthly data

Postby spaceniuzai » Tue Aug 31, 2010 8:30 am

trubador: thanks a lot for your help. The second question is solved (I was thinking the same approach but was wondering if there is a simpler command to do it, like rebase( ) :)

However, with regard to my first question, the problem remains. My data is multi-year data, so if I replace z(1)=series(1), only Jan of the first year is corrected. Januarys for the remaining years are still incorrect (being equal to Jan minus last Dec ytd). Any suggestions? Thanks!

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13603
Joined: Tue Sep 16, 2008 5:38 pm

Re: Convert ytd data to monthly data

Postby EViews Gareth » Tue Aug 31, 2010 8:37 am

Code: Select all

series z = @recode(@month=1,y,d(y))
Where y is the series that contains year-to-date, and z is the series you want to contain levels.



For what it is worth, to go the other way (i.e. from levels to year-to-date), you could do:

Code: Select all

series y = @recode(@month=1,z,z+y)

spaceniuzai
Posts: 6
Joined: Tue Aug 31, 2010 6:28 am

Re: Convert ytd data to monthly data

Postby spaceniuzai » Tue Aug 31, 2010 9:00 am

Eviews Gareth: thank you so much! It really helps.

Code: Select all

series z = @recode(@month=1,y,d(y))
Where y is the series that contains year-to-date, and z is the series you want to contain levels.



For what it is worth, to go the other way (i.e. from levels to year-to-date), you could do:

Code: Select all

series y = @recode(@month=1,z,z+y)

EViewsUserMark
Posts: 1
Joined: Fri Sep 17, 2010 6:57 am

Re: Convert ytd data to monthly data

Postby EViewsUserMark » Fri Sep 17, 2010 7:08 am

I have a series with yearly data and I want to convert it to monthly data.
It's for a regression and when you take the dlog you get no growth rates (because it's the same number for 12 months).

My question is: How do I convert my yearly data to monthly data?

Thanks!

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13603
Joined: Tue Sep 16, 2008 5:38 pm

Re: Convert ytd data to monthly data

Postby EViews Gareth » Fri Sep 17, 2010 8:10 am

Create a monthly page in the same workfile, then copy the yearly data over to the monthly page.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests