Dear All

I am estimating a standard RE model. In the example below I estimate coefficients a11,a12,a13,a21,a22,a23.

I can write the model in two versions

version 1:

model(linear);

x(1) = a11*x + a12*y(-1) + a13*eps;
y = a21*x + a22

*y(-1) + a23*eta;

end;

version 2:

model(linear);

# [b11,b12,b13,b21,b22,b23]=BK(a11,a12,a13,a21,a22,a23);

y = b11*y(-1) + b12*eta + b13 *eps;
x = b21*y(-1) + b22*eta + b23 *eps;

end;

In the version 2 I use a matlab subroutine that solves the RE model (performing say Blanchard-Kahn decomposition, or, more generally qz decomposition).

I wonder why the estimates differ SUBSTANTIALLY, both and posteriors of coefficients and marginal data densities? I would have thought that the Dynare translates version 1 into version 2 before the estimation. Am I wrong? (The BK decomposition I use is standard and correct - I cannot see how it can be wrong.)

PS. I work witn Dynare 3 as Dynare 4 does not eat the line # [b11,b12,b13,b21,b22,b23]=BK(a11,a12,a13,a21,a22,a23); I will be also grateful if one explains how to call Matlab routines inside the model block.

Tanya