# Oo_.mean v.s. Converged unconditional mean in simulation

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!

1 Like

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.