Can Dynare solve this problem?

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Can Dynare solve this problem?

Postby Thisisusername » Thu Dec 11, 2014 6:35 am

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!
Attachments
abcd.mod
(278 Bytes) Downloaded 36 times
Thisisusername
 
Posts: 4
Joined: Mon Feb 17, 2014 5:58 am

Re: Can Dynare solve this problem?

Postby jpfeifer » Sat Dec 13, 2014 5:12 pm

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 10 guests