Moving Average
Moderators: EViews Gareth, EViews Moderator
Moving Average
I would like to use a moving average of a series as an independent variable in an OLS equation but EViews does not seem to allow it. I can get around this by putting in a long hand calculation equal to the moving average but this is very cumbersome. Is there a way around this problem?
-
- Non-normality and collinearity are NOT problems!
- Posts: 3775
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Moving Average
Code: Select all
@movav
Re: Moving Average
I was using mav rather movav. The difference seems to be that with mav the averages are not propagated and with movav they are propagated. Can you explain the meaning of this term in its EViews context?
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13318
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Moving Average
Code: Select all
X = 3, NA, 2
@movav(x,3) = (3 + NA + 2)/3 = NA
@mav(x,3) = (3 + 2)/2 = 2.5
Follow us on Twitter @IHSEViews
-
- Posts: 25
- Joined: Sun Feb 19, 2017 1:25 pm
Re: Moving Average
EViews Gareth wrote:Code: Select all
X = 3, NA, 2
@movav(x,3) = (3 + NA + 2)/3 = NA
@mav(x,3) = (3 + 2)/2 = 2.5
Hi Gareth,
Hope you're well.
I understand that in the above, x = the series I want to manipulate, and 3 is the fixed rolling window.
But how could I use the @MAV(x,3) function above to generate a series with an expanding rolling window? i.e. I'd like no restrictions, so the 3 shouldn't be there, rather it should be infinitity/unlimited.
Currently I can do fixed rolling moving average using the following series rtmovavgasx200=@mav(rtasx200,5) while this might still be satisfactory (I still need to confirm with my superior), I'd like to know how to do the expanding rolling window just in case. Any help appreciated.
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13318
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Moving Average
I don't understand what an infinite moving average is.
Follow us on Twitter @IHSEViews
-
- Posts: 25
- Joined: Sun Feb 19, 2017 1:25 pm
Re: Moving Average
EViews Gareth wrote:I don't understand what an infinite moving average is.
I think I've fixed it. I simply changed the 5 above to 5,218 for the total number of observations. This way it's like a long term mean. This is what I needed, although I may yet not use it.
series rtmovavgasx200=@mav(rtasx200,5,218)
Thanks.
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13318
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Moving Average
Follow us on Twitter @IHSEViews
-
- Posts: 25
- Joined: Sun Feb 19, 2017 1:25 pm
Re: Moving Average
EViews Gareth wrote:http://www.eviews.com/help/helpintro.html#page/content%2Fmathapp-Cumulative_Statistic_Functions.html
Thanks. Works even better.
Return to “General Information and Tips and Tricks”
Who is online
Users browsing this forum: No registered users and 43 guests