Page 1 of 1

State Space Modeling Advice

Posted: Mon Jul 16, 2012 6:19 am
by coolrunnings87
Hi,

I'm trying to run this Kalman Filter Estimation based upon a Pindyck paper regarding the long-run evolution of energy prices over time (1998).
pindyck.docx
(66.29 KiB) Downloaded 366 times
(this attachment is just a shot of the equation in the document)

Signal Equation:
P_t = Constant + Constant*P_t-1 + Phi1,t + time*Phi2,t +e_t

State Equations:
Phi1,t = Constant*Phi1,t-1 + e_t
Phi1,t = Constant*Phi1,t-1 + e_t

I have never used a state space object such that the signal multiplies the unobservable state by time. Therefore, I'm unsure about how do I write the time*Phi2,t part of the equation. Does anyone have any idea about how to accomplish this? As of now my equation looks like this:

@ename e1
@ename e2
@ename e3

@evar var(e1)=exp(C(1))
@evar var(e2)=exp(C(2))
@evar var(e3)=exp(C(3))

@signal logp= C(6)*logp(-1) +SV1+SV2+C(7)+e3
@state SV1 = C(4)*SV1(-1)+e1
@state SV2 = C(5)*SV2(-1)+e2

I know my signal equation is wrong since I need to figure out how to multiply SV2*time. If anyone has any idea that would be greatly appreciated (I only recently moved from constructing state space models in Eviews from MatLab and/or Stata).

Thanks!

Omar

Re: State Space Modeling Advice

Posted: Mon Jul 16, 2012 10:21 am
by EViews Glenn
I think

Code: Select all

@signal logp= C(6)*logp(-1) +SV1+SV2*@trend+C(7)+e3
should do it.

Re: State Space Modeling Advice

Posted: Mon Jul 16, 2012 12:42 pm
by coolrunnings87
Great and thanks!

Now that the signal equation is correct, and I have run the model, the estimation of parameters results in singular covariance and no unique solution. Is there an option to change how initial parameters are selected (perhaps by OLS regression?) in running the state space model in Eviews?

Thanks again.

Re: State Space Modeling Advice

Posted: Mon Jul 16, 2012 1:32 pm
by EViews Glenn
They're taken from the values in the C coefficient vector at the start of estimation. You are responsible for filling these values in if you want to change them.

Re: State Space Modeling Advice

Posted: Mon Aug 20, 2012 9:43 am
by catherineyoho
Hi,

I also encountered the same problem. I cast a set of mixed frequency data into state space form. However I always get the warning to be singular covariance. I have tried to set initial values and set a smallest convergence, but it does not appear to work. I have attached the eviews file. Could you please give me some advices in how to over come this problem. I would really appreciate if I can get reply as soon as possible.

Thank you so very much!

Catherine

Re: State Space Modeling Advice

Posted: Wed Oct 30, 2013 11:30 am
by maya
as dear "EViews Glenn " said
after OLS estimation of initial values, we should Note that when you estimate an equation, it updates the coefficients in the default coefficient vector. Or you can simply edit the coefficient vector.
am i right?
but i don't knowe how to do the ols for SV and others such as "var = exp(c(05))"?
i 'm really sorry for my littel information in Sspace models!
:oops:

Re: State Space Modeling Advice

Posted: Wed Oct 30, 2013 11:39 am
by EViews Glenn
There are no OLS equivalents for the SVs since those are the unobserved states. You should simply pick values for the AR that you view as plausible. The values for the signal equation variance should be set to the log of the residual variance (or thereabouts). For the state variances, your guess is as good as mine. You want to set the coefficients to the logs of your guesses at the state variances.

Re: State Space Modeling Advice

Posted: Wed Oct 30, 2013 1:26 pm
by maya
dear EViews Glenn,
please send us as example for your statements
me and my sister will be so thankful of your favor! we 're really getiing confused about initial values!
please do the initial values of the attached "pindyck.wft" to can simulate it to our workfile

thnak a lot
best regards

Re: State Space Modeling Advice

Posted: Thu Oct 31, 2013 10:00 am
by EViews Glenn
I'm sorry, but I'm going to have to respectfully decline as this really isn't a support issue.