# DLM package, state equation, maximum likelihood with constant terms

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.

• In another way my question is how can I estimate through the dlm package an arima(1) with intercept different from zero? – 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.
• 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. – F. Tusell Jun 8 '15 at 8:30