State Space Modeling Advice

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

coolrunnings87
Posts: 2
Joined: Mon Jul 16, 2012 5:58 am

State Space Modeling Advice

Postby coolrunnings87 » Mon Jul 16, 2012 6:19 am

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 365 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

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: State Space Modeling Advice

Postby EViews Glenn » Mon Jul 16, 2012 10:21 am

I think

Code: Select all

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

coolrunnings87
Posts: 2
Joined: Mon Jul 16, 2012 5:58 am

Re: State Space Modeling Advice

Postby coolrunnings87 » Mon Jul 16, 2012 12:42 pm

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.
Attachments
pindyck.wf1
(12.27 KiB) Downloaded 284 times

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: State Space Modeling Advice

Postby EViews Glenn » Mon Jul 16, 2012 1:32 pm

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.

catherineyoho
Posts: 1
Joined: Mon Aug 20, 2012 9:21 am

Re: State Space Modeling Advice

Postby catherineyoho » Mon Aug 20, 2012 9:43 am

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

maya
Posts: 3
Joined: Sun Oct 27, 2013 8:35 am

Re: State Space Modeling Advice

Postby maya » Wed Oct 30, 2013 11:30 am

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:

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: State Space Modeling Advice

Postby EViews Glenn » Wed Oct 30, 2013 11:39 am

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.

maya
Posts: 3
Joined: Sun Oct 27, 2013 8:35 am

Re: State Space Modeling Advice

Postby maya » Wed Oct 30, 2013 1:26 pm

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

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: State Space Modeling Advice

Postby EViews Glenn » Thu Oct 31, 2013 10:00 am

I'm sorry, but I'm going to have to respectfully decline as this really isn't a support issue.


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests