Page 1 of 1

oo_.mean v.s. Converged unconditional mean in simulation

PostPosted: Mon Jan 18, 2016 7:06 pm
by superztt
Hi all,

I thought oo_.mean is the unconditional mean in a stochastic model. Another way to get the unconditional mean is to simulate a long time series and the simulation will converge to the unconditional mean. Is this right?

But how is oo_.mean calculated? Because if the two are the same, why getting oo_.mean is very quick while simulating a long series is very time consuming?

For another, I change one parameter in a range of numbers, oo_.mean changes smoothly, while the end of simulation varies jaggedly. And the pattern of the two differ.

Appears I cannot reconcile my understanding and what I got. Can anyone tell me what is wrong? e.g. Is it because I didn't simulated long enough, as I use irf=1000? Or discrepancy between theory and approximation? Or some fundamental mistakes? Many thanks!

Re: oo_.mean v.s. Converged unconditional mean in simulation

PostPosted: Tue Jan 19, 2016 9:33 am
by jpfeifer
The mean is an average, so you cannot look at the end point of a simulation. irf=1000 only controls the impulse responses, but not the length of the simulations. They are governed by the periods statement. If you do not specify the periods statement, Dynare will compute the theoretical mean from the state space representation of the solution. This can be done quickly. If you specify the periods option, Dynare will take the average over a simulation. This takes longer. If you simulate a really long time series the theoretical and simulated mean will finally coincide.

Re: oo_.mean v.s. Converged unconditional mean in simulation

PostPosted: Sun Jan 24, 2016 12:01 am
by superztt
Thanks for the reply.

I noticed when I have an irf which is explosive in the 2nd order approximation, I still have a finite theoretic mean and variance reported. Does that mean theoretic moments are computed regardless of the order of approximation in the irfs ? Or because the explosive irfs is a rare case, weighted little in the whole distribution?

I don't think it is the second reason, because how likely the explosive irfs happen depend on the s.d. I give in the variance block. I personally think it is just different ways of computation between theoretic moments and irfs. Not sure.



jpfeifer wrote:The mean is an average, so you cannot look at the end point of a simulation. irf=1000 only controls the impulse responses, but not the length of the simulations. They are governed by the periods statement. If you do not specify the periods statement, Dynare will compute the theoretical mean from the state space representation of the solution. This can be done quickly. If you specify the periods option, Dynare will take the average over a simulation. This takes longer. If you simulate a really long time series the theoretical and simulated mean will finally coincide.

Re: oo_.mean v.s. Converged unconditional mean in simulation

PostPosted: Sun Jan 24, 2016 7:35 pm
by jpfeifer
See the answer at http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=6890
The theoretical moments at second order are based on the linear state space. It will never be explosive if the BK conditions are satisfied. The same cannot be said for simulations at higher order unless pruning is used. As generalized IRFs at higher order require simulations, you can have them explode (and simulated moments being infinite), while still getting finite theoretical moments.