Kalman and residual variance

Questions and discussions on Vector Autoregressions
tclark
Posts: 99
Joined: Wed Nov 08, 2006 3:20 pm

Kalman and residual variance

Unread post by tclark »

I am looping over time and using KALMAN to update the coefficient estimates of a VAR. To get updates of the error var-cov matrix, I could use STEPS to compute the updated time series of residuals and VCV or CMOM to compute the var-cov matrix at each point in time. But does anyone know of a computationally more efficient way to get the updated variance estimates? Thanks.
Todd Clark
Economic Research Dept.
Federal Reserve Bank of Cleveland
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Kalman and residual variance

Unread post by TomDoan »

By default, the residuals are recomputed for the entire data range at each Kalman step, so you wouldn't have to use STEPS. You would, however, have to use VCV to compute the covariance matrix. However, you can use the option RESIDS=RECURSIVE and the accumulated outer products of the recursive residuals will give the recursive sums of squares of the standard residuals through a given time period, so you can do a running calculation rather than recomputing from T=1 each time
tclark
Posts: 99
Joined: Wed Nov 08, 2006 3:20 pm

Re: Kalman and residual variance

Unread post by tclark »

Great -- thank you
Todd Clark
Economic Research Dept.
Federal Reserve Bank of Cleveland
Post Reply