Page 2 of 2

Re: Kalman Filter estimation

Posted: Thu Aug 05, 2010 8:36 am
by Aqua
I used to specify the variances. When i don't, I have the same error than you.
Put it just before the specification of your state space, like this

c(1)=your value,
c(2)= your value,
.
.
.
Here, define your state space.

Re: Kalman Filter estimation

Posted: Thu Aug 05, 2010 8:45 am
by king_luca
I'm sorry but I still get an error message saying that "coefficients not allowed for signal dependent variable in equation "c(1) = 0.2".

Here is my code to be clear :

c(1) = 0.2
c(2) = 0.2
c(3) = 0.2
c(4) = 0.2
c(5) = 0.2
c(6) = 0.2
c(7) = 0.2
c(8) = 0.2


@signal CONV__ARB_ = sv1*BONDS + sv2*CMDTY + sv3*CREDIT + sv4*EMM_B + sv5*EMM_E + sv6*S_P + sv7*USD + [var = exp(c(1))]

@state sv1 = sv1(-1) + [var = exp(c(2))]
@state sv2 = sv2(-1) + [var = exp(c(3))]
@state sv3 = sv3(-1) + [var = exp(c(4))]
@state sv4 = sv4(-1) + [var = exp(c(5))]
@state sv5 = sv5(-1) + [var = exp(c(6))]
@state sv6 = sv6(-1) + [var = exp(c(7))]
@state sv7 = sv7(-1) + [var = exp(c(8))]

Re: Kalman Filter estimation

Posted: Thu Aug 05, 2010 8:59 am
by EViews Gareth
You can't include the c= parts inside the state space specification. Do that outside of the statespace prior to estimation.

i.e. in the command window (the white bit at the top of EViews), type:

Code: Select all

c=0.2
Then open up your State space object and hit Estimate.

Re: Kalman Filter estimation

Posted: Thu Aug 05, 2010 9:07 am
by king_luca
I'm really sorry but it doesn't work...

1) I type c=0.2 in the command window and hit "enter" to compute it
2) I specify my Sspace using "auto-specification", with a diagonal matrix for signal variance and state variance --> gives me the same code as before
3) I hit "estimate" and I get : "Missing valu found in signal transition matrix"

Re: Kalman Filter estimation

Posted: Thu Aug 05, 2010 10:51 am
by startz
Thank you.

But do I need to specify that I want to estimate c(1),...,c(8) ? If yes, could you tell me where ?

Thank you again
No, EViews understands that. Something else mysterious is going on.
You might post your workfile, including the system object that you're trying to estimate.

Re: Kalman Filter estimation

Posted: Thu Aug 05, 2010 11:09 am
by king_luca
Thank you... IHere is my workfile with the code :

@signal CON_AR = sv1*BONDS + sv2*CMDTY + sv3*CREDITS + sv4*EMMB + sv5*EMME + sv6*SP + sv7*USD + [var = exp(c(1))]

@state sv1 = sv1(-1) + [var = exp(c(2))]
@state sv2 = sv2(-1) + [var = exp(c(3))]
@state sv3 = sv3(-1) + [var = exp(c(4))]
@state sv4 = sv4(-1) + [var = exp(c(5))]
@state sv5 = sv5(-1) + [var = exp(c(6))]
@state sv6 = sv6(-1) + [var = exp(c(7))]
@state sv7 = sv7(-1) + [var = exp(c(8))]

My goal would be to get the 7 coefficients (sv1,...,sv7) for each of my observations and an estimation of the unknown paramters c(1),...,c(8).

If you can help me it would be great! Thank you

Re: Kalman Filter estimation

Posted: Thu Aug 05, 2010 11:56 am
by startz
Are you running on the most recent update of EViews? On my system the estimate works fine, except that you end up with a singular variance. My guess is that is a data issue. If you run

Code: Select all

ls CON_AR BONDS CMDTY CREDITS EMMB EMME SP USD
you'll see that SP and USD don't much matter.

Re: Kalman Filter estimation

Posted: Thu Aug 05, 2010 12:35 pm
by king_luca
no it's not the most recent update... I'll update it and try again.

I'm sorry, I'm really new in Eviews but is "ls" a least square regression ?

It might be a data issue but I have to use these data anyway...

Thank you for your precious help.

I hope it'll work...

Re: Kalman Filter estimation

Posted: Thu Aug 05, 2010 12:51 pm
by startz
Yes, ls means least squares regression.

You might find the free chapters at http://www.eviews.com/illustrated/illustrated.htmlhelpful in jumpstarting your EViews trip.

Re: Kalman Filter estimation

Posted: Wed Aug 11, 2010 10:56 am
by EViews Glenn
The C(1) etc are the parameters in the variances. If you look at your equations you'll see where they enter.

And not to ask a silly question, but you do realize that you are estimating with random walk coefficients using CON_AR data that appear to be stationary?

Re: Kalman Filter estimation

Posted: Wed Aug 11, 2010 11:00 am
by startz
Glenn,

Not having thought about this carefully, is there anything wrong with using a random walk for time-varying coefficients of a stationary model? I thought this was pretty standard.