Transformation of existing time series variable

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

Pantera
Posts: 44
Joined: Mon Dec 21, 2009 5:32 am

Transformation of existing time series variable

Postby Pantera » Tue Jun 26, 2012 3:19 am

Hi all,
I have the following problem (in geo-science): I want to generate a new time series variable which measures the accumulated (the sum) of an existing variable "X", given that the time window is moving with a constant width of let say 40 years. More precisely - the new variable is generating in the following way: Let the sum of the first 40 observations from time point t = 1 to t = 40 represents the first observation, the second observation is the sum of the observations from t = 2 to time point t = 41, the third observation is the sum of the observations from t = 3 to t = 42 etc. The constant time window of 40 years is moving by one step at the time. It's like a mowing average but WITHOUT dividing by the number of observations. It would be of great help if one of you experts could look into the problem.

Regards, P.

startz
Non-normality and collinearity are NOT problems!
Posts: 3797
Joined: Wed Sep 17, 2008 2:25 pm

Transformation of existing time series variable

Postby startz » Tue Jun 26, 2012 7:52 am

Use the moving average function multiply by 40.

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

Re: Transformation of existing time series variable

Postby EViews Gareth » Tue Jun 26, 2012 8:00 am

Or, use the moving sum function (@msum)

Pantera
Posts: 44
Joined: Mon Dec 21, 2009 5:32 am

Re: Transformation of existing time series variable

Postby Pantera » Wed Jun 27, 2012 12:05 am

Thanks Starz and Gareth for the suggestions - I'll test them out.

Regards.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests