Recursive least square estimation
Posted: Thu Aug 16, 2012 11:06 am
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
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