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
initial conditions in SSPACE
Moderators: EViews Gareth, EViews Moderator
-
- EViews Developer
- Posts: 2672
- Joined: Wed Oct 15, 2008 9:17 am
Re: initial conditions in SSPACE
You can just set the values of the C vector outside of the object.
Re: initial conditions in SSPACE
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
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13315
- Joined: Tue Sep 16, 2008 5:38 pm
Re: initial conditions in SSPACE
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
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
Who is online
Users browsing this forum: No registered users and 22 guests