Kalman Filter with I(1) variables
Kalman Filter with I(1) variables
Hi there,
I want to estimate a single equation with I(1) variables using the Kalman Filter techniques in oder to obtain time varying coefficients. Currently, I use Rats 7.0. I already found a simple way to carry out the basic estimation
equation equ1 a
# constant b c
system equ1
end(system)
estimate 1976:01 1989:12
do time=1990:01, 2007:12
kalman(cohistory=cokalman,residuals=res,print=(time==1989:12))
end do
This is a restricted form of the Standard Kalman Filter. Now my question is whether this formular is sufficient in case of I(1) variables which are cointegrated. As far as I understand, the constant should be able to capture remaining nonlinearity as long as the states are represented by randwom walks.
Any help is appreciated
Best Regards
Gilbril
I want to estimate a single equation with I(1) variables using the Kalman Filter techniques in oder to obtain time varying coefficients. Currently, I use Rats 7.0. I already found a simple way to carry out the basic estimation
equation equ1 a
# constant b c
system equ1
end(system)
estimate 1976:01 1989:12
do time=1990:01, 2007:12
kalman(cohistory=cokalman,residuals=res,print=(time==1989:12))
end do
This is a restricted form of the Standard Kalman Filter. Now my question is whether this formular is sufficient in case of I(1) variables which are cointegrated. As far as I understand, the constant should be able to capture remaining nonlinearity as long as the states are represented by randwom walks.
Any help is appreciated
Best Regards
Gilbril
Re: Kalman Filter with I(1) variables
That would probably not be my choice for what you're doing. The problem isn't with the variables being I(1). It's that the equation has all kinds of misspecification errors. The error term presumably is serially correlated, and is contemporaneously correlated with the regressors. Both of those violate assumptions that govern the Kalman filter for this model. While the standard result is that the estimates from a one-off estimate of this model are superconsistent because of the cointegration, you are running a sequence starting with a relatively small number of data points. In practice, people don't use simple least squares estimates of the cointegrating vector because there are superior ways to handle it---FMOLS, DOLS, maximum likelihood---that don't rely solely on (very) large sample asymptotics to correct for the misspecification. CATS, for instance, has recursive estimation of the cointegrating vector by ML. Of those three, the only one which can be done recursively using the Kalman filter is DOLS. However, there isn't a good reason with modern computers to choose Kalman filtering over direct estimates on rolling samples---rolling samples for ML takes a fraction of a second, so the superior speed of something that can be done by Kalman filtering isn't noticeable.
Re: Kalman Filter with I(1) variables
Dear Tom,
thank you very much for your reply, I will have a look at the recursive ML estimates. However, could you give me a quick idea how Kalman Filtering could be used with DOLS based on the code I mentioned above? Thank you
Regards
Gilbril
thank you very much for your reply, I will have a look at the recursive ML estimates. However, could you give me a quick idea how Kalman Filtering could be used with DOLS based on the code I mentioned above? Thank you
Regards
Gilbril
Re: Kalman Filter with I(1) variables
DOLS estimates the cointegrating vector by augmenting the y on x regression that you have with current, lags, and leads of x-x{1} for each of the right side variables. Set that up as your equation and Kalman filter it. You'll just have to stop a few entries before the end of the data set because of the need for leads of the differences.
Re: Kalman Filter with I(1) variables
Dear Tom,
I have now carried out estimations for both the Kalman Filter based on DOLS and ML recursive for Rats. The estimates for the Kalman-Filter show a much more stable pattern. The final estimates are in both cases suprisingly close to a fixed estimate based on ML over the whole period.
Anyway, thank you very much for your help and your time!
I have now carried out estimations for both the Kalman Filter based on DOLS and ML recursive for Rats. The estimates for the Kalman-Filter show a much more stable pattern. The final estimates are in both cases suprisingly close to a fixed estimate based on ML over the whole period.
Anyway, thank you very much for your help and your time!