I am trying to estimate the following state space model with the dlm package in R:
Y_t = theta_t + beta * x_t + e_t where e_t ~ N(0, sigma_e)
theta_t = alpha + lambda * theta_{t-1} + gamma * x_t + w_t
where w_t ~ N(0, sigma_w)
I have two questions on the estimating and forecasting this general ARMAX model in the dlm package.
Can I estimate this model using the
dlmpackage in R? I have not been able to find any examples that show how to model the exogenous variable in the state equation. This makes it different fromdlmModRegwhere exogenous variables only in the measurement equation is allowed (as per my understanding). I do have Petris's DLM book.I could possibly estimate the parameters in some other package such as
MARSS, though I would prefer to stick to thedlmpackage. Still I would like to input those estimates into thedlmpackage to be able to generate forecasts withdlmForecast. Hence, my question is how do I create adlmobject from those externally obtained estimates, that could then be used withdlmForecast?
Would appreciate any insights on these questions.
Cheers,
Raghu.