Kalman and residual variance
Kalman and residual variance
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
Economic Research Dept.
Federal Reserve Bank of Cleveland
Re: Kalman and residual variance
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
Re: Kalman and residual variance
Great -- thank you
Todd Clark
Economic Research Dept.
Federal Reserve Bank of Cleveland
Economic Research Dept.
Federal Reserve Bank of Cleveland