Page 1 of 1

compute the average of the previous year in a monthly series

Posted: Thu Oct 08, 2015 11:34 am
by eviewsuserforum
Hopefully my question fits in this subforum.

I have been stuck with what is probably dumb.

I have a monthly time series say from 2010m1 to 2016m12.

For each month throughout year Y, I need Eviews to return the Jan-Dec average of year Y-1

eg, if mean for 2014 is 5, I need Eviews to return 5 for months Jan-15 to Dec-15 to be set to 5.

and I would like to avoid creating new object. gloups!

Can someone help please?

Re: compute the average of the previous year in a monthly se

Posted: Thu Oct 08, 2015 11:59 am
by startz

Code: Select all

series annualMeans = @meansby(y,@year) series laggedAverage = annualMeans(-12)
Maybe...