centered movav in model

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

pcruzd
Posts: 2
Joined: Thu Dec 14, 2017 11:53 am

centered movav in model

Postby pcruzd » Fri Jul 13, 2018 1:10 pm

Hi, I have a model (mod) and I want it to generate a variable that is the centered moving average of another one to use it in further calculations in the model.

lets say I have the mod model
mod.append y=mx+n
mod.append z = @movavc(y,4)

the model runs ok only if the @movavc(.) is not included in it.

Any ideas?
(notice that I want the model to do further calculations with z, so genrating the serie z = @movavc(y_0,4) after solving the model is not a solution)

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

Re: centered movav in model

Postby EViews Gareth » Fri Jul 13, 2018 1:17 pm

Try calculating the average manually:

Code: Select all

mod.append z = (0.5*y(-2) + y(-1) + y + y(1) + 0.5*y(2))/4
Follow us on Twitter @IHSEViews


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 8 guests