Page 1 of 1

SState ML estimation ignores initial values

Posted: Fri Feb 25, 2022 10:12 am
by Fifis
Good afternoon!

I am trying to estimate a state-space model, and it converges slowly, so I wanted to help the optimiser by estimating it once, saving those values for posterity, and then, using them as the initial values. I did it as described in an older topic, http://forums.eviews.com/viewtopic.php?t=15425, but couldn't make it work.

My specification goes like this:

Code: Select all

sspace xport xport.append @SIGNAL XB_R_Q_G_S = C(011) * S1 + U01_0 xport.append @SIGNAL LAG_PMIMANUS_M_S = C(021) * S1 + U02_0 ... ' State equations (~transition equations) xport.append @STATE S1 = C(1) * S1(-1) + C(2) * S2(-1) + [ VAR = 1 ] xport.append @STATE S2 = S1(-1) ... vector(19) svec0 svec0.fill 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 xport.append @mprior svec0 xport.ml(covinfo = "hessian", m = 100, c = 0.0001)
After estimating a heavy model once, I would like to provide these estimated C(...) values to save time. I tried doing it in both ways before the estimation part (i.e. before invoking xport.ml).

First:

Code: Select all

param C(1) 1.312443 C(2) -0.419682 C(11) 0.350661 ... C(94) -1.450587
Second:

Code: Select all

C(1)=1.312443 C(2)=-0.419682 ... C(94)=-1.450587
However, when I run the next line with xport.ml, it still starts at some automatically guessed values and takes the same number of iterations to converge as if I had supplied nothing. The initial log-likelihood value, as evidenced by xport.ml(m=0, ...), is -896; after 10 iterations, it is -827, and the final one after 89 iterations is -819. No matter how I set the values of C(...), the initial log-likelihood value is always -896, an it should be the final one because I am already supplying the optimal values of the coefficients as starting values (or so do I think). The numerical gradient at the optimal values is very close to zero (below 1e-8 for each coordinate), so no further optimisation should be carried out. Yet it takes another 89 iterations to start climbing from the initial values of -896.

How do I supply the previously optimised values as the initial ones to sspace to save time?

Yours sincerely,
Andreï V. Kostyrka

Re: SState ML estimation ignores initial values

Posted: Fri Feb 25, 2022 12:21 pm
by EViews Glenn
Sorry you are having problems. Which version of EViews are you using and what is the build date? Thanks.

Re: SState ML estimation ignores initial values

Posted: Mon Feb 28, 2022 1:47 am
by Fifis
Dear Glenn,

I am using EViews 12 Enterprise Edition, build Jan 19 2022.

Yours sincerely,
Andreï V. Kostyrka

Re: SState ML estimation ignores initial values

Posted: Mon Feb 28, 2022 6:28 am
by Fifis
Sorry, I figured it out.

Turns out, appending the parameter values in one of the earlier lines was fixing them in such a manner that the vector was being ignored, and I forgot that it existed:

Code: Select all

xport.append @PARAM C(1) 1.75606 C(2) -0.806248 ... C(94) -4.057869
It was non-obvious to me that the initial values were taken not from the updated C(...) but from the @PARAM appended to the model.

Thank you!

Yours sincerely,
Andreï V. Kostyrka

Re: SState ML estimation ignores initial values

Posted: Mon Feb 28, 2022 10:01 am
by EViews Glenn
Great.

The values are taken from C (or whatever the explicit references are in the sspace object) but the @param overrides that default behavior.