Page 1 of 1

Estimating Variances of Errors in the State Space Framework

Posted: Wed Jun 24, 2009 9:56 am
by dhanssen
Hi,

This is a very basic question, but I wanted to make sure that I was interpreting the code correctly. If I would like to estimate a random variance for the error in your state or signal equations, the code is the following:


@state sv1 = sv1(-1) + [var = exp(c(2))]

(and similar for the signal)

However, if you would like to estimate the model with a known variance (say, variance = 1), the code is the following

@signal y = c(1) + sv1 + sv2 + [var = 1]

Is this correct? Thanks!

Re: Estimating Variances of Errors in the State Space Framework

Posted: Wed Jun 24, 2009 10:07 am
by startz
That's exactly the example which appears in the documentation for state space.

Re: Estimating Variances of Errors in the State Space Framework

Posted: Wed Jun 24, 2009 10:27 am
by dhanssen
Ha - yes, which is why I used it. I just wanted to make sure that I was interpreting correctly what it meant. It sounds like I am?

Re: Estimating Variances of Errors in the State Space Framework

Posted: Wed Jun 24, 2009 10:34 am
by startz
Yes. (Okay, I admit I haven't tried it. :) )

Re: Estimating Variances of Errors in the State Space Framework

Posted: Mon Jun 29, 2009 12:25 pm
by dhanssen
What is the reason for gettng the following error message: "Missing or Negative Variance found in State Equation 1" when I try to estimate the variance in this manner in the state equation? I get a similiar message, only appled to the signal equation, at times as well.