Commit 9425b363 authored by MichelJuillard's avatar MichelJuillard
Browse files

fixing problems related to auxiliary variables

parent 6ad56d95
......@@ -47,25 +47,10 @@ end
steady_state_old = oo_.steady_state;
% If using a steady state file, initialize oo_.steady_state with that file
if options_.steadystate_flag
[ys,check] = feval([M_.fname '_steadystate'], ...
oo_.steady_state, ...
[oo_.exo_steady_state; ...
oo_.exo_det_steady_state]);
if size(ys, 1) < M_.endo_nbr
if length(M_.aux_vars) > 0
ys = add_auxiliary_variables_to_steadystate(ys,M_.aux_vars, ...
M_.fname, ...
oo_.exo_steady_state, ...
oo_.exo_det_steady_state, ...
M_.params,...
options_.bytecode);
else
error([M_.fname '_steadystate.m doesn''t match the model']);
end
end
oo_.steady_state = ys;
[oo_.steady_state,M.params,info] = evaluate_steady_state(oo_.steady_state,M_,options_,oo_,0);
if info(1)
print_info(info,options_.noprint)
end
% Compute the residuals
......
......@@ -4020,7 +4020,7 @@ DynamicModel::substituteLeadLagInternal(aux_var_t type, bool deterministic_model
// - lead variables from lower lead to higher lead (need to be listed in reverse order)
// - lag variables from lower lag to higher lag
if ((type == avEndoLead) || (type == avExoLead))
copy(neweqs.rbegin(), neweqs.rend(), back_inserter(aux_equations));
copy(neweqs.begin(), neweqs.end(), back_inserter(aux_equations));
else
copy(neweqs.begin(), neweqs.end(), back_inserter(aux_equations));
......
......@@ -30,6 +30,7 @@ MODFILES = \
steady_state/walsh1_old_ss.mod \
steady_state/walsh1_ssm.mod \
steady_state/walsh1_ssm_block.mod \
steady_state/multi_leads.mod
steady_state_operator/standard.mod \
steady_state_operator/use_dll.mod \
steady_state_operator/block.mod \
......
@#define N = 4
var A B;
varexo eB;
parameters Bss rho;
Bss=1;
rho=0.9;
model;
A = B(@{N});
B = (1-rho)*Bss +rho*B(-1) +eB;
end;
steady_state_model;
A = Bss;
B = Bss;
end;
resid;
steady;
check;
shocks;
var eB ; stderr 1 ;
end;
stoch_simul(order=1,irf=0) ;
Markdown is supported
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