moving average

For questions regarding programming in the EViews programming language.

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

skit
Posts: 2
Joined: Thu Nov 06, 2008 3:11 pm

moving average

Postby skit » Thu Nov 06, 2008 3:33 pm

Help to learn more about moving average. Who knows as this method on EViews is realised? If can lay out a source code or algorithm.

P.S. The information only to EViews, how the method works in other programs I know.

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

Re: moving average

Postby EViews Gareth » Thu Nov 06, 2008 4:26 pm

Are you talking about MA estimation (as in ARMA models), or the @MOVAV/@MAV functions?
Follow us on Twitter @IHSEViews

skit
Posts: 2
Joined: Thu Nov 06, 2008 3:11 pm

Re: moving average

Postby skit » Fri Nov 07, 2008 5:06 am

@MOVAV/@MAV functions

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

Re: moving average

Postby EViews Gareth » Fri Nov 07, 2008 8:31 am

ok, I'm not quite sure I understand what you are asking then, but the @movav function is quite simply the average of the values of a series over the current and previous time periods (or observations). i.e.

Code: Select all

 @movav(x,3) = (X+X(–1)+X(–2))/ 3
Follow us on Twitter @IHSEViews

AngieL
Posts: 17
Joined: Tue Aug 09, 2016 8:17 am

Re: moving average

Postby AngieL » Tue Aug 16, 2016 9:37 am

Hi,

I am trying to do the moving average but this message shows up :
@MOVAV is an illegal or reserved name.

Why is this happening?

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

Re: moving average

Postby EViews Gareth » Tue Aug 16, 2016 9:44 am

Hard to know what you're doing wrong without knowing what you're doing.
Follow us on Twitter @IHSEViews

AngieL
Posts: 17
Joined: Tue Aug 09, 2016 8:17 am

Re: moving average

Postby AngieL » Tue Aug 16, 2016 10:19 am

I copy pasted the formula mentioned and this is what I get the attached.

Thanks,
Angie
Attachments
Untitled.png
Untitled.png (212.82 KiB) Viewed 14410 times
s&p's data ('05-'14).wf1
(69.45 KiB) Downloaded 334 times

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

Re: moving average

Postby EViews Gareth » Tue Aug 16, 2016 10:55 am

What are you trying to do with the moving average?
Follow us on Twitter @IHSEViews

AngieL
Posts: 17
Joined: Tue Aug 09, 2016 8:17 am

Re: moving average

Postby AngieL » Tue Aug 16, 2016 11:08 am

It is mentioned in one of the papers that in order to make the Random Effects legit (to pass the Hausman test) I need the averages of the variables that is how they did it and I am trying to do the same, but it is not working. This is the paper : https://www.ecb.europa.eu/pub/pdf/scpwp ... ddd523a402

Could you please help it would be so much appreciated?

Thank you,
Angie

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

Re: moving average

Postby EViews Gareth » Tue Aug 16, 2016 11:17 am

If you're trying to use the moving average as a regressor, then include it as a regressor.
Follow us on Twitter @IHSEViews

AngieL
Posts: 17
Joined: Tue Aug 09, 2016 8:17 am

Re: moving average

Postby AngieL » Tue Aug 16, 2016 11:20 am

No I want to have the moving average for every variable and then use them as regressors. Is that do-able?

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

Re: moving average

Postby EViews Gareth » Tue Aug 16, 2016 11:33 am

Yes, just add the moving average of each variable as a regressor.
Follow us on Twitter @IHSEViews

AngieL
Posts: 17
Joined: Tue Aug 09, 2016 8:17 am

Re: moving average

Postby AngieL » Tue Aug 16, 2016 11:34 am

But why do I get that error message

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

Re: moving average

Postby EViews Gareth » Tue Aug 16, 2016 11:38 am

Because you aren't including it as a regressor. There's no equation to be seen.
Follow us on Twitter @IHSEViews

AngieL
Posts: 17
Joined: Tue Aug 09, 2016 8:17 am

Re: moving average

Postby AngieL » Tue Aug 16, 2016 11:46 am

So how do I do that?
Please help!


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 34 guests