Page 1 of 1

Q : Coding the multiplication of expected variables

PostPosted: Fri Jun 12, 2009 12:48 am
by kym0802
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.

Re: Q : Coding the multiplication of expected variables

PostPosted: Mon Jun 15, 2009 1:30 pm
by StephaneAdjemian
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.

Re: Q : Coding the multiplication of expected variables

PostPosted: Tue Jun 16, 2009 2:40 am
by kym0802
Thank you for your help!