Q : Coding the multiplication of expected variables

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.

Q : Coding the multiplication of expected variables

Postby kym0802 » Fri Jun 12, 2009 12:48 am

Hi, all.

I derived an equation such as y_t = E_t[ (x_t+1)*(z_t+1) ]

that I coded this equation as y = x(+1)*z(+1) .

However, I think this coding would mean this ; y_t = E_t[x_t+1]*E_t[z_t+1]

So, to avoid such confusion, I coded the equation as y = x(+1)*z(+1) +c

where 'c' is a constant variable represanting the covariance of x and z.

I'm not sure whether it is a reasonable way or not.

Thanks for reading and hope for any reply.
kym0802
 
Posts: 5
Joined: Tue Apr 15, 2008 10:39 am

Re: Q : Coding the multiplication of expected variables

Postby StephaneAdjemian » Mon Jun 15, 2009 1:30 pm

Hi,

You are wrong. Let s_t be a vector of endogenous variables. Dynare
consider problems of the following form:

E_t [f(s_{t-1},s_t,s_{t+1},e_t,e_{t+1})] = 0

where f is a function defining the model and e is the structural
innovation. So Dynare interprets:

y = x(+1)*z(+1)

as

y_t = E_t[ (x_t+1)*(z_t+1) ]

But if in your model you have something like:

y_t = E_t[x_t+1]*E_t[z_t+1]

you have to declare two auxiliary variables:

Ex = x(1)
Ez = z(1)

and write:

y = Ex*Ez

Best,
Stéphane.
Stéphane Adjemian
Université du Maine, GAINS and DynareTeam
https://stepan.adjemian.eu
StephaneAdjemian
 
Posts: 429
Joined: Wed Jan 05, 2005 4:24 pm
Location: Paris, France.

Re: Q : Coding the multiplication of expected variables

Postby kym0802 » Tue Jun 16, 2009 2:40 am

Thank you for your help!
kym0802
 
Posts: 5
Joined: Tue Apr 15, 2008 10:39 am


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 11 guests