Hi,
I'm doing a simple OLS regression, and I'd like to estimate and store coefficients recursively, using either an anchored or a rolling estimation period.
I know I could do this into a loop, but it seems that I could do it faster using the "rls" function.
So far, I'm doing this:
equation eq1.ls log(ser1/ser1(-60)) = c(1) + c(2) * log(ser2/ser2(-60))
eq1.rls(c)
2 questions:
- It seems that this "rls" function is using an anchored estimation period, am I right ? Can we use it with a rolling window ?
- The coefficients are plotted on a graph ,but I can't find the underlying series, how do I retrieve them (I actually do not need the chart, just the series).
Thanks :D
Recursive least square estimation
Moderators: EViews Gareth, EViews Moderator
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Recursive least square estimation
RLS won't do what you want. However there are numerous examples of doing rolling regression here on the forum, plus there is an EViews add-in that does it.
Re: Recursive least square estimation
Thanks for your quick answer :D !
Actually, I think my explanation wasn't that clear, because I think "rls" would do what I want.
I'd like to simulate doing this regression everyday for the past 50 years, and construct series of coefficients that do not contain forward looking data (coef at time t is computed by doing the regression on a sample that includes only information known up to time t, and so on).
I tried again and replaced rls(c) by rls(c,s) and it seems to be working: I have my series R_C1 and R_C2 with the 2 coefficients over time.
Am I wrong or using this rls function is the equivalent of doing ls regressions in a loop, expanding the estimation sample by a day at each iteration, and storing the coefficients in time series ?
Thanks
Actually, I think my explanation wasn't that clear, because I think "rls" would do what I want.
I'd like to simulate doing this regression everyday for the past 50 years, and construct series of coefficients that do not contain forward looking data (coef at time t is computed by doing the regression on a sample that includes only information known up to time t, and so on).
I tried again and replaced rls(c) by rls(c,s) and it seems to be working: I have my series R_C1 and R_C2 with the 2 coefficients over time.
Am I wrong or using this rls function is the equivalent of doing ls regressions in a loop, expanding the estimation sample by a day at each iteration, and storing the coefficients in time series ?
Thanks
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Recursive least square estimation
RLS won't do rolling, only anchored.
So your description of what it is doing is correct, but if you want rolling, not anchored, you'll have to use rolling regression.
So your description of what it is doing is correct, but if you want rolling, not anchored, you'll have to use rolling regression.
Re: Recursive least square estimation
OK. I'll just stick with anchored for now.
Many thanks.
Many thanks.
Who is online
Users browsing this forum: No registered users and 2 guests
