Series relative to fixed month

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

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

tvonbrasch
Posts: 372
Joined: Fri Apr 15, 2011 5:35 am

Series relative to fixed month

Postby tvonbrasch » Wed Nov 01, 2017 6:08 am

Hi

I have monthly data and I want to crreat a series that is a ratio of a variable relative to the value of the variable in december the year before, i.e.,

Code: Select all

y_mar_2017 = x_mar_2017 / x_dec_2016
y_feb_2017 = x_feb_2017 / x_dec_2016
y_jan_2017 = x_jan_2017 / x_dec_2016
y_dec_2016 = x_dec_2016 / x_dec_2015
y_nov_2016 = x_nov_2016 / x_dec_2015
....



what is the best way to create such a y-series?
Thomas

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

Re: Series relative to fixed month

Postby EViews Gareth » Wed Nov 01, 2017 7:47 am

Code: Select all

x/@lastsby(x, @year)
Follow us on Twitter @IHSEViews

tvonbrasch
Posts: 372
Joined: Fri Apr 15, 2011 5:35 am

Re: Series relative to fixed month

Postby tvonbrasch » Wed Nov 01, 2017 8:40 am

excellent, thanks
Thomas


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 5 guests