[R] Time varying coefficients with Kalman

gordon dinetto gordon.dinetto at gmx.net
Sun Mar 27 14:13:07 CEST 2005


Dear R-users

Is there any possibility to estimate a regression model with time varying
intercept and slope of the form: 

r(t)   = a(t) + b(t)*x(t) + eta(t)
a(t+1) = a(t) + v(t)
b(t+1) = b(t) + w(t)

by utilising the Kalman routines in R. I have tried the KalmanLike in (ts)
but it seems to be designed for univariate models whereas the (dse) bundle
deals with multivariate time series only. The state space form of this model
is as follows: 
z(t+1) = F*z(t) + Q(t)
r(t)   = H*z(t) + R(t)

where z(t+1) = [a(t+1),b(t+1)]' is the state vector containing the time
varying coefficients, F = I the transition matrix, and H = [1,x(t)]' the
output matrix, with Q(t) and R(t) as system noise and output noise matrix
respectively.
Any suggestions for alternative solutions are greatly appreciated.

Best regards,
Gordon Dinetto

-- 
Sparen beginnt mit GMX DSL: http://www.gmx.net/de/go/dsl




More information about the R-help mailing list