Commit 73e1ddf7 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Merge pull request #961 from rattoma/gsa

Fix bug for models with leads and legs in exo variables
parents bf707c19 a39c2606
......@@ -130,7 +130,7 @@ else
dyssdtheta=zeros(length(oo_.dr.ys),M_.param_nbr);
d2yssdtheta=zeros(length(oo_.dr.ys),M_.param_nbr,M_.param_nbr);
[residual, gg1] = feval([M_.fname,'_static'],oo_.dr.ys, oo_.exo_steady_state', M_.params);
df = feval([M_.fname,'_params_derivs'],yy0, oo_.exo_steady_state', ...
df = feval([M_.fname,'_params_derivs'],yy0, repmat(oo_.exo_steady_state',[M_.maximum_exo_lag+M_.maximum_exo_lead+1]), ...
M_.params, oo_.dr.ys, 1, dyssdtheta, d2yssdtheta);
dyssdtheta = -gg1\df;
if nargout>5,
......@@ -192,9 +192,9 @@ if nargout>5,
% g22 = get_all_2nd_derivs(gpp,m,nelem,M_.param_nbr);
% g22 = g22(:,:,indx,indx);
else
[df, gp] = feval([M_.fname,'_params_derivs'],yy0, oo_.exo_steady_state', ...
[df, gp] = feval([M_.fname,'_params_derivs'],yy0, repmat(oo_.exo_steady_state',[M_.maximum_exo_lag+M_.maximum_exo_lead+1,1]), ...
M_.params, oo_.dr.ys, 1, dyssdtheta,d2yssdtheta);
[residual, g1, g2 ] = feval([M_.fname,'_dynamic'],yy0, oo_.exo_steady_state', ...
[residual, g1, g2 ] = feval([M_.fname,'_dynamic'],yy0, repmat(oo_.exo_steady_state',[M_.maximum_exo_lag+M_.maximum_exo_lead+1,1]), ...
M_.params, oo_.dr.ys, 1);
[nr, nc]=size(g2);
end
......
......@@ -75,7 +75,7 @@ if info(1)==0,
tau=[oo_.dr.ys(oo_.dr.order_var); vec(A); dyn_vech(B*M_.Sigma_e*B')];
yy0=oo_.dr.ys(I);
[residual, g1 ] = feval([M_.fname,'_dynamic'],yy0, ...
oo_.exo_steady_state', M_.params, ...
repmat(oo_.exo_steady_state',[M_.maximum_exo_lag+M_.maximum_exo_lead+1]), M_.params, ...
oo_.dr.ys, 1);
vg1 = [oo_.dr.ys(oo_.dr.order_var); vec(g1)];
......@@ -118,7 +118,7 @@ if info(1)==0,
ide_strength_J_prior=NaN(1,nparam);
if init, %~isempty(indok),
normaliz = abs(params);
if prior_exist,
if prior_exist,
if ~isempty(estim_params_.var_exo),
normaliz1 = estim_params_.var_exo(:,7)'; % normalize with prior standard deviation
else
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment