Exogenous variable in a state equation in DLM package in R

605 Views Asked by At

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 dlm package 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 from dlmModReg where 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 the dlm package. Still I would like to input those estimates into the dlm package to be able to generate forecasts with dlmForecast. Hence, my question is how do I create a dlm object from those externally obtained estimates, that could then be used with dlmForecast?

Would appreciate any insights on these questions.

Cheers,

Raghu.

0

There are 0 best solutions below