Page 1 of 1

Can Dynare solve this problem?

PostPosted: Thu Dec 11, 2014 6:35 am
by Thisisusername
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!

Re: Can Dynare solve this problem?

PostPosted: Sat Dec 13, 2014 5:12 pm
by jpfeifer
I have to look into this more, but it seems the answer is no. It might be that you need to go to fourth order.