From 9b3c83554ae4fac188fa74bc1e94fb36ed7a05f6 Mon Sep 17 00:00:00 2001 From: Michel Juillard Date: Sun, 21 Apr 2013 21:27:52 +0200 Subject: [PATCH] adding the constant (steady state + effect of future uncertainty) to the simulated series with 3rd order approximation --- matlab/simult_.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/matlab/simult_.m b/matlab/simult_.m index 844f89f83..02af027d9 100644 --- a/matlab/simult_.m +++ b/matlab/simult_.m @@ -139,6 +139,9 @@ else end case 3 % only with pruning + % the third moments of the shocks are assumed null. We don't have + % an interface for specifying them + constant = dr.ys(order_var) + 0.5*dr.ghs2; ghx = dr.ghx; ghu = dr.ghu; ghxx = dr.ghxx; @@ -182,7 +185,7 @@ else + gyy12 + ghxss*yhat1 + ghuss*u); yhat2 = ghx*yhat2 + gyy + guu + 2*gyu + ghs2; yhat1 = ghx*yhat1 + ghu*u; - y_(order_var,i) = yhat1 + (1/2)*yhat2 + (1/6)*yhat3; + y_(order_var,i) = constant + yhat1 + (1/2)*yhat2 + (1/6)*yhat3; yhat1 = yhat1(ipred); yhat2 = yhat2(ipred); yhat3 = yhat3(ipred);