Hi,

I have a problem like this:

suppose y~N(0,1), z = exp(y), x = y^2;

I want to compute E(x*z)/E(z) using dynare.

In matlab,

y = randn(1000,1);

z = exp(y);

x = y.^2;

mean(x.*z)/mean(z) is around 2, which is the correct answer.
mean(x) is around 1, which is wrong by making E(x*z)/E(z) to be E(x)E(z)/E(z)

Can I evaluate the answer 2 by using dynare? Say, if y is white noise, and I want to evaluate E_t(z(+1)*x(+1))/E_t(z(+1)). I cannot do that with the code below, I guess it is due to the linearization problem. Is there any way to do this. Thanks!

abcd.mod (278 Bytes)