Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sébastien Villemot
dynare
Commits
9425b363
Commit
9425b363
authored
Oct 19, 2011
by
MichelJuillard
Browse files
fixing problems related to auxiliary variables
parent
6ad56d95
Changes
4
Hide whitespace changes
Inline
Side-by-side
matlab/resid.m
View file @
9425b363
...
...
@@ -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
...
...
preprocessor/DynamicModel.cc
View file @
9425b363
...
...
@@ -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
.
r
begin
(),
neweqs
.
r
end
(),
back_inserter
(
aux_equations
));
copy
(
neweqs
.
begin
(),
neweqs
.
end
(),
back_inserter
(
aux_equations
));
else
copy
(
neweqs
.
begin
(),
neweqs
.
end
(),
back_inserter
(
aux_equations
));
...
...
tests/Makefile.am
View file @
9425b363
...
...
@@ -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
\
...
...
tests/steady_state/multi_leads.mod
0 → 100644
View file @
9425b363
@#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) ;
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment