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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
Stéphane Adjemian
dynare
Commits
5d2b7720
Verified
Commit
5d2b7720
authored
3 years ago
by
Stéphane Adjemian
Browse files
Options
Downloads
Patches
Plain Diff
Fix growth neutrality correction in PAC/MCE equation.
(cherry picked from commit
4cf1a358
)
parent
fdebbd89
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
matlab/+pac/+mce/parameters.m
+15
-5
15 additions, 5 deletions
matlab/+pac/+mce/parameters.m
preprocessor
+1
-1
1 addition, 1 deletion
preprocessor
with
16 additions
and
6 deletions
matlab/+pac/+mce/parameters.m
+
15
−
5
View file @
5d2b7720
...
@@ -11,7 +11,7 @@ function parameters(pacname)
...
@@ -11,7 +11,7 @@ function parameters(pacname)
% SPECIAL REQUIREMENTS
% SPECIAL REQUIREMENTS
% none
% none
% Copyright
(C)
2019 Dynare Team
% Copyright
©
2019
-2021
Dynare Team
%
%
% This file is part of Dynare.
% This file is part of Dynare.
%
%
...
@@ -69,8 +69,18 @@ for e=1:number_of_pac_eq
...
@@ -69,8 +69,18 @@ for e=1:number_of_pac_eq
% Get PAC equation
% Get PAC equation
pac_equation
=
equations
.
(
eqtag
);
pac_equation
=
equations
.
(
eqtag
);
% Get Error correction and autoregressive parameters in PAC equation
% Get Error correction and autoregressive parameters in PAC equation
a
=
NaN
(
1
+
pac_equation
.
max_lag
,
1
);
params
=
NaN
(
2
+
pac_equation
.
max_lag
,
1
);
a
(
1
)
=
M_
.
params
(
pac_equation
.
ec
.
params
);
params
(
1
)
=
M_
.
params
(
pac_equation
.
ec
.
params
);
a
(
1
+
(
1
:
pac_equation
.
max_lag
))
=
M_
.
params
(
pac_equation
.
ar
.
params
);
params
(
1
+
(
1
:
pac_equation
.
max_lag
))
=
M_
.
params
(
pac_equation
.
ar
.
params
);
M_
.
params
(
pac_equation
.
mce
.
alpha
)
=
a2alpha
(
a
);
params
(
end
)
=
M_
.
params
(
pacmodel
.
discount_index
);
[
G
,
alpha
,
beta
]
=
buildGmatrixWithAlphaAndBeta
(
params
);
M_
.
params
(
pac_equation
.
mce
.
alpha
)
=
alpha
;
if
isfield
(
pacmodel
,
'growth_neutrality_param_index'
)
A
=
[
alpha
;
1
];
A_1
=
polyval
(
A
,
1.0
);
A_b
=
polyval
(
A
,
beta
);
m
=
length
(
alpha
);
d
=
A_1
*
A_b
*
(
iota
(
m
,
m
)
'*
inv
((
eye
(
m
)
-
G
)
*
(
eye
(
m
)
-
G
))
*
iota
(
m
,
m
));
M_
.
params
(
pacmodel
.
growth_neutrality_param_index
)
=
1
-
sum
(
params
(
2
:
end
-
1
))
-
d
;
end
end
end
\ No newline at end of file
This diff is collapsed.
Click to expand it.
preprocessor
@
ce43e91b
Compare
d5284672
...
ce43e91b
Subproject commit
d5284672347920167987ce024bb47e7e8eafeb38
Subproject commit
ce43e91b57141eb5d377cba950b4ccbc1fa4fb1b
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