[R] dlm package: how to specify state space model?

Christian Schoder schoc152 at newschool.edu
Wed Oct 6 04:30:10 CEST 2010


Dear r-users!

I have another question regarding the dlm package and I would be very
happy if someone could give me a hint!

I am using the dlm package to get estimates for an endogenous rate of
capacity utilization over time. The general form of a state space model
is

(1) b_t = G * b_t-1 + w_t    w_t ~ N(0,W)

(2) y_t= A' * x_t + H' * b_t + v_t     v_t ~ N(0,V)

(Hamilton 1984: 372)

The investment function I would like to use for estimating my endogenous
capacity utilization rate looks like

(3) g_t = x[1] + x[2]*(u_t-un_t) + x[3]*r + v_t

where g_t is the investment rate, r_t is the profit rate, u_t is the
actual utilization rate and un_t is the 'normal' utilization rate which
I take as endogenous (=time varying). x[i] are parameters. I'm
particularly interested in this endogenous normal utilization rate. How
can I specify a state space model which allows me to estimate it and is
consistent with the structure of the state space models in the dlm
package?

In the form found in Hamilton my system would look like

(4) un_t = x[4] * un_t-1 + w_t      w_t ~ N(0,W)

(5) g_t = (x[1],x[2],x[3]) * (1,u_t,r_t)' + x[2] * un_t + v_t    v_t ~
N(0,V)

which theoretically can be estimated even with the restriction that the
parameters of u_t and un_t have opposite signs, but are otherwise equal.
But how can I do this with the plm package which requires a model of the
following form:

(6) b_t = G * b_t-1 + w_t    w_t ~ N(0,W)

(7) y_t = F * b_t + v_t     v_t ~ N(0,V)

How can I write my model in the form of (6) and (7) such that my state
vector includes un_t and I can get estimates for the normal rate of
capacity utilization??

I would be very grateful for any help, cause I've been sitting on this
issue for a while!

Christian



More information about the R-help mailing list