powered by
Kalman gain matrix of the partially autoregressive model
kalman.gain.par(rho, sigma_M, sigma_R)
The coefficient of mean reversion
The standard deviation of the innovations of the mean-reverting component
The standard deviation of the innovations of the random walk component
Returns a two-component vector (K_M, K_R) representing the Kalman gain matrix.
(K_M, K_R)
The state space representation of the partially autoregressive model is given as
[ M[t] ] [ rho 0 ] [ M[t-1] ] [ epsilon_M[t] ] [ ] = [ ] [ ] + [ ] [ R[t] ] [ 0 1 ] [ R[t-1] ] [ epsilon_R[t] ]
where the innovations epsilon_M[t] and epsilon_R[t] have the covariance matrix
epsilon_M[t]
epsilon_R[t]
[ epsilon_M[t] ] [ sigma_M^2 0 ] [ ] ~ [ ] [ epsilon_R[t] ] [ 0 sigma_R^2 ]
The steady state Kalman gain matrix is given by the matrix
[ K_M ] [ ] [ K_R ]
where $$K_M = 2 sigma_M^2 / (sigma_R * ( sqrt((rho + 1)^2 sigma_R^2 + 4 sigma_M^2) + (rho + 1) sigma_R ) + 2 sigma_M^2)$$ and \(K_R = 1 - K_M\).
Clegg, Matthew. Modeling Time Series with Both Permanent and Transient Components using the Partially Autoregressive Model. Available at SSRN: http://ssrn.com/abstract=2556957
fit.par
# NOT RUN { kalman.gain.par(0, 1, 0) # -> c(1, 0) (pure AR(1)) kalman.gain.par(0, 0, 1) # -> c(0, 1) (pure random walk) kalman.gain.par(0.5, 1, 1) # -> c(0.3333, 0.6667) # }
Run the code above in your browser using DataLab