3
$\begingroup$

I am trying to use DLM package in R to estimate a state space repersentation of the term structure model, where observation and state equation are as follows

$y(t )= F* x_t +e_t$
$x_t- \mu = G* (x_{t-1}-\mu) +n_t$

where $e_t$ and $n_t$ are Gaussian. Only modification with standard DLM representation in the R is the term $\mu$ (mean of the state variable) (which is also unknown) in the state equation. I am not sure how to use DLM package to estimate such models.

I would be extremely grateful for the any help in this regard.

$\endgroup$

1 Answer 1

1
$\begingroup$

It seems to me that your state equation can be writen as $$\pmatrix{x_t \\ \mu_t} = \pmatrix{G & I-G \\ 0 & I}\pmatrix{x_{t-1} \\\mu_{t-1}} + \pmatrix{n_t \\ 0}.$$ The extra element in the state vector will track after some iterations of the Kalman filter the fixed mean $\mu$.

$\endgroup$
3
  • $\begingroup$ thanks a lot Tusell ...I got the idea...but I think modification should be $ \pmatrix{G & I-G \\ 0 & I}$ .... $\endgroup$
    – Sudarshan
    Commented Jan 8, 2018 at 14:49
  • $\begingroup$ Quite right, my bad. I will edit the answer. $\endgroup$
    – F. Tusell
    Commented Jan 8, 2018 at 15:12
  • $\begingroup$ Would it be possible for you to help me on this one as well ....stats.stackexchange.com/questions/322667/… $\endgroup$
    – Sudarshan
    Commented Jan 13, 2018 at 5:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.