Page 1 of 1

centered movav in model

Posted: Fri Jul 13, 2018 1:10 pm
by pcruzd
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)

Re: centered movav in model

Posted: Fri Jul 13, 2018 1:17 pm
by EViews Gareth
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