# Mean of productivity shock counterintuitive

Hi everybody,

Just discovered Dynare and I’m kinda impressed. Self-instructing myself and running some .mod-files with RBC models I discovered the following curiosity:

The mean of the Z, which is the productivity shock that follows the AR(1) process ln(Z)=rho*ln(Z(-1))+eps where mean(eps)=0 and var(eps)>0, is 1.0005. Shouldn’t it be 1? PBAP1.mod which is an example file where the problem occurs is enclosed. When entering the AR(1) equation without ln but inserting everwhere else exp(Z) when the shock appears Dynare delivers a mean of zero. What is the problem?

Many thx in advance and kind regards

Peter Schmid

PBAP1.mod (1.78 KB)

Hi Peter,

there is nothing wrong here except that it is not a sound idea to define the exogenous variables as you do when a second order expansion is used. If you write something like (i omit the shock):

z_t = z_{t-1}^{\rho}exp(\epsilon_t)

The deterministic steady state is z^{\star}=1 and the first order approximation around this steady state will be:

z_t - z^{\star} = \rho (z_t-z_{\star}) + \epsilon_t

The mean of z_{t} will be 1, it’s Ok. But now consider a second order approximation around the same deterministic steady state, we have :

z_t - z^{\star} = \rho (z_{t-1}-z_{\star}) + \epsilon_t + .5*\rho*(\rho-1)(z_{t-1}-z^{\star})^2 + .5\epsilon_t^2 + …

(cross product term is missing). Because of the quadratic terms, the mean of z_t is now different from the deterministic steady state (equal to one). This may have some sense for an endogenous variable (in an rbc model the precautionary savings will show up in this discrepancy between the deterministic steady state and the mean), but not in the case of an exogenous variable.

If we define the exogenous variable as in your mod file :

log(z_t) = \rho*\log z_{t-1} + \epsilon_t

we face the same problem. Because of the logarithms, quadratic terms will appear with a second order approximation and create the same gap between the dterministic steady state and the mean.

But if you define z as the logged productivity by writing instead:

z_t = \rho z_{t-1} + \epsilon_t

and if you replace z by exp(z) in the other equations of the model block (you should also change z in initval), then you won’t see any “conterintuituive” results because the model for z is linear.

Best,
Stéphane.