My question is about the DLM package and the dlmMLE.

Lest's say that I have a bivariate model of this kind:

$$Y(t)= Fb(t)+e(t)$$ $$b(t) = u + Gb(t) +w(t)$$

$$b(t)=(b_1(t),b_2(t)),\quad u = (u_1,u_2)$$ Rewriting the model in matrix notation, the state equation becomes: $$d(t) = H d(t) +w(t),$$ where $d(t)= (b(t),1,1)$ and $H$ is a matrix 4x4 given by the merging the 2 matrices 2x4 $[G,\text{diag}(u)]$ and $ [0,\text{diag}(1,p)]$, and the variance of the innovations $w$ is a matrix of zeros except for the upper right 2x2. Morover I assume that $C_0=\text{diag}(1e3,1e3,0,0)$

Since it doesn't work well I was wondering if it is the right way to write it?

Thanks I would appreciate any suggestions.

  • $\begingroup$ In another way my question is how can I estimate through the dlm package an arima(1) with intercept different from zero? $\endgroup$ – TED Jan 23 '12 at 13:46

You might subtract the constant terms from the observed $Y$'s and maximize the likelihood with respect to all parameters in the state space model plus the constant terms.

Or, you might turn to packages like FKF which explicitly allow for intercepts in both the state and measurement equation.

  • $\begingroup$ Thanks, I would prefer not to subtract the constant terms cause I would like to estimate them. $\endgroup$ – TED Jan 23 '12 at 15:39
  • 1
    $\begingroup$ The two things are not incompatible; what you subtract is a value that is also optimized along with the rest of parameters. $\endgroup$ – F. Tusell Jan 23 '12 at 17:47
  • $\begingroup$ @F.Tusell : Dear Mr. Tusell, I hope I am not acting against the etiquette of CV, but I have a very similar problem which I posted here: stats.stackexchange.com/questions/155569/… . Could you maybe explain this substracting method? I followed your advice to use the FKF package but it seems much more complicated to me than dlm. $\endgroup$ – chameau13 Jun 5 '15 at 18:10
  • $\begingroup$ Answered privately. Either I misread the original question, or it may have changed along the way: my suggestion of subtracting from $Y(t)$ came on the understanding that the non-random inputs were in the observation equation, NOT on the state equation, so it does not apply here as the equations stand. $\endgroup$ – F. Tusell Jun 8 '15 at 8:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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