SSM TVC

Discussion of State Space and Dynamic Stochastic General Equilibrium Models
BinhPham
Posts: 51
Joined: Tue Feb 14, 2017 10:00 am

SSM TVC

Unread post by BinhPham »

Hi Tom,

I follow the SSM example but fail to estimate the simple linear model as below:

Measurement: du(t) = beta0 + beta1(t)*dy(t) + e(t)
State: beta1(t) = beta1(t-1) + v(t)

That is I don't want beta0 varying over time, thus only beta1(t) is time-varying.
I use option MU = beta0 as follows:

Code: Select all

LINREG(DEFINE=SSM_MOD) DU
# DY

declare vect sigmav
declare real sigmae
declare real beta0

compute sigmae = 0.5*sqrt(%seesq)
compute sigmav = 0.01*%stderrs
compute bete0 = 0

nonlin sigmae sigmav beta0

* Two variables DU, DY are stationary so I use ERGODIC option
dlm(y=DU,c=%eqnxvector(SSM_MOD,t),mu=beta0,sw=%diag(sigmav^2),sv=sigmae^2,$
presample=ergodic,method=solve,type=smooth) / xstates vstates

set beta_tvc = xstates(t)(1)
But the estimated beta1(t) aren't the expected ones obtained from the equivalent EViews SSM code:

Code: Select all

@signal du = c(1) + sv1*dy + [var=exp(c(2))]
@state sv1 = sv1(-1) + [var=exp(c(3))]
What I want is the smooth state of beta (SV1) as in the EV SSM model.
Where am I wrong with DLM?

Many thanks.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: SSM TVC

Unread post by TomDoan »

METHOD=SOLVE doesn't estimate the parameters.
BinhPham
Posts: 51
Joined: Tue Feb 14, 2017 10:00 am

Re: SSM TVC

Unread post by BinhPham »

Many thanks. I made mistake, it should be bfgs.
Post Reply