Dear Tom,
I should model a rls regression of the type:
rls(options) lY / resids
# const lk ll {leads and lags of the covariates}
I should restrict lk + ll =1 and all leads and lags to be equal zero (for instence).
If I impose the restriction by using the 'restrict' or 'mrestrict' option, the 'cohist' series will rely on the basic rls regression with no restrrictions.What can i do?
Thank you
Recursive Least square
Re: Recursive Least square
RLS won't handle restrictions like that. Is there a reason that you're including variables for which you want zero restrictions? If you're trying to do sequential exclusion restrictions, the way to do that is to run two RLS's (over the same range) and use the CSQUARED values to construct the F-statistics:
The other restriction would be done similarly, except you would have to use a constructed regressor to code the restriction.
It's also possible to do the restricted regressions in the original form by recursive least squares using the KALMAN instruction (which isn't picky about singular covariance matrices). But that's quite a bit more complicated.
Code: Select all
rls(csquared=csquaredunr,dfhistory=dfunr) rate
# constant rate{1 to 6}
rls(csquared=csquaredres,dfhistory=dfres) rate %regstart() *
# constant rate{1}
set frunning = (csquaredres-csquaredunr)/(dfres-dfunr)/(csquaredunr/dfunr)
graph
# frunningIt's also possible to do the restricted regressions in the original form by recursive least squares using the KALMAN instruction (which isn't picky about singular covariance matrices). But that's quite a bit more complicated.