Page 1 of 1

initial conditions in SSPACE

Posted: Wed May 23, 2018 8:55 am
by pvalls
I am estimating the following state space after estimating by ols and want to use as initial conditions for the SSPace the ols residual variance of C(2) and for C(3)
But the @param only allows number but not scalar

equation eq1.ls rcpetrobras_on c rcibovespa
scalar ols_petrobras_pn=eq1.@coef(2)
scalar c1 = eq1.@coef(1)
scalar c2 = (eq1.@se)^2
scalar c3 = c2/2
series beta_ols_petrobras_pn=ols_petrobras_pn
' tvp for petrobras_pn
sspace sspetrobras_pn
sspetrobras_pn.append @signal rcpetrobras_pn = c(1) + sv1*rcibovespa+[var = c(2)]
sspetrobras_pn.append @state sv1 = sv1(-1) + [var = c(3)]
sspetrobras_pn.append @param C(2) c2 C(3) c3
sspetrobras_pn.ml

Re: initial conditions in SSPACE

Posted: Fri May 25, 2018 4:38 pm
by EViews Glenn
You can just set the values of the C vector outside of the object.

Re: initial conditions in SSPACE

Posted: Fri Jun 08, 2018 4:46 pm
by pvalls
But if you set the C vector outside the State Space Object it will treat it as fixed and I want them as initial conditions

Re: initial conditions in SSPACE

Posted: Fri Jun 08, 2018 4:47 pm
by EViews Gareth
No, it won't.

Re: initial conditions in SSPACE

Posted: Sat Jun 09, 2018 3:10 pm
by pvalls
I used the program below and the three parameters are keeped fixed
Also try
vector C(1) = eq414.@coef(1)
vector C(2) = (eq414.@se)^2
vector C(1) = c(2) /2
and get an error
also try without the @param and it did not work


' ols for petrobras_pn
equation eq414.ls rcpetrobras_pn c rcibovespa
scalar ols_petrobras_pn=eq414.@coef(2)
scalar c1 = eq414.@coef(1)
scalar c2 = (eq414.@se)^2
scalar c3 = c2/2
series beta_ols_petrobras_pn=ols_petrobras_pn
' tvp for petrobras_pn
sspace sspetrobras_pn
sspetrobras_pn.append @signal rcpetrobras_pn = c1 + sv1*rcibovespa+[var = exp(c2)]
sspetrobras_pn.append @state sv1 = sv1(-1) + [var = exp(c3)]
sspetrobras_pn.append @param c1 c2 c3
sspetrobras_pn.ml
show sspetrobras_pn