Page 1 of 1

SSM TVC

Posted: Fri Nov 09, 2018 2:42 pm
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.

Re: SSM TVC

Posted: Fri Nov 09, 2018 7:18 pm
by TomDoan
METHOD=SOLVE doesn't estimate the parameters.

Re: SSM TVC

Posted: Fri Nov 09, 2018 7:36 pm
by BinhPham
Many thanks. I made mistake, it should be bfgs.