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
Dynare
dynare
Commits
f1ed81aa
Commit
f1ed81aa
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.
parent
06e6db58
No related branches found
No related tags found
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 @
f1ed81aa
...
...
@@ -69,29 +69,7 @@ if exogenousvariables.vobs>constraints.vobs
end
% Add auxiliary variables in initialconditions object.
for
i
=
1
:
length
(
DynareModel
.
aux_vars
)
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
[
initialconditions
,
info
]
=
checkdatabase
(
initialconditions
,
DynareModel
,
true
,
false
);
% Get the list of endogenous and exogenous variables.
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