Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dynare
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Frédéric Karamé
dynare
Commits
ac5fcbe2
Commit
ac5fcbe2
authored
7 years ago
by
Stéphane Adjemian
Browse files
Options
Downloads
Patches
Plain Diff
Use new approach for setting aux variables in model inversion routine.
(cherry picked from commit
f1ed81aa
)
parent
14fbfa02
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
matlab/model_inversion.m
+1
-23
1 addition, 23 deletions
matlab/model_inversion.m
with
1 addition
and
23 deletions
matlab/model_inversion.m
+
1
−
23
View file @
ac5fcbe2
...
@@ -69,29 +69,7 @@ if exogenousvariables.vobs>constraints.vobs
...
@@ -69,29 +69,7 @@ if exogenousvariables.vobs>constraints.vobs
end
end
% Add auxiliary variables in initialconditions object.
% Add auxiliary variables in initialconditions object.
for
i
=
1
:
length
(
DynareModel
.
aux_vars
)
[
initialconditions
,
info
]
=
checkdatabase
(
initialconditions
,
DynareModel
,
true
,
false
);
if
~
ismember
(
DynareModel
.
endo_names
{
DynareModel
.
aux_vars
(
i
)
.
endo_index
},
initialconditions
.
name
)
switch
DynareModel
.
aux_vars
(
i
)
.
type
case
1
% lag on endogenous variable.
initialconditions
{
DynareModel
.
endo_names
{
DynareModel
.
aux_vars
(
i
)
.
endo_index
}}
=
...
initialconditions
{
DynareModel
.
endo_names
{
DynareModel
.
aux_vars
(
i
)
.
orig_index
}}
.
lag
(
abs
(
DynareModel
.
aux_vars
(
i
)
.
orig_lead_lag
));
case
8
% diff on endogenous variable.
initialconditions
{
DynareModel
.
endo_names
{
DynareModel
.
aux_vars
(
i
)
.
endo_index
}}
=
...
initialconditions
{
DynareModel
.
endo_names
{
DynareModel
.
aux_vars
(
i
)
.
orig_index
}}
.
diff
.
lag
(
abs
(
DynareModel
.
aux_vars
(
i
)
.
orig_lead_lag
));
case
3
% lag on exogenous variable.
initialconditions
{
DynareModel
.
endo_names
{
DynareModel
.
aux_vars
(
i
)
.
endo_index
}}
=
...
initialconditions
{
DynareModel
.
exo_names
{
DynareModel
.
aux_vars
(
i
)
.
orig_index
}}
.
lag
(
abs
(
DynareModel
.
aux_vars
(
i
)
.
orig_lead_lag
));
case
0
% lead on endogenous variable.
initialconditions
{
DynareModel
.
endo_names
{
DynareModel
.
aux_vars
(
i
)
.
endo_index
}}
=
...
initialconditions
{
DynareModel
.
endo_names
{
DynareModel
.
aux_vars
(
i
)
.
orig_index
}}
.
lead
(
abs
(
DynareModel
.
aux_vars
(
i
)
.
orig_lead_lag
));
case
2
% lead on exogenous variable.
initialconditions
{
DynareModel
.
endo_names
{
DynareModel
.
aux_vars
(
i
)
.
endo_index
}}
=
...
initialconditions
{
DynareModel
.
exo_names
{
DynareModel
.
aux_vars
(
i
)
.
orig_index
}}
.
lead
(
abs
(
DynareModel
.
aux_vars
(
i
)
.
orig_lead_lag
));
otherwise
error
(
"This is a bug! PLease report to Dynare developpers."
)
end
end
end
% Get the list of endogenous and exogenous variables.
% Get the list of endogenous and exogenous variables.
endo_names
=
DynareModel
.
endo_names
;
endo_names
=
DynareModel
.
endo_names
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment