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
4cf1a358
Verified
Commit
4cf1a358
authored
3 years ago
by
Stéphane Adjemian
Browse files
Options
Downloads
Patches
Plain Diff
Fix growth neutrality correction in PAC/MCE equation.
parent
380fd84c
No related branches found
No related tags found
No related merge requests found
Pipeline
#5870
passed
3 years ago
Stage: build
Stage: test
Stage: pkg
Stage: deploy
Changes
2
Pipelines
1
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 @
4cf1a358
...
@@ -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
@
784dd412
Compare
6863494d
...
784dd412
Subproject commit
6863494db2fe509ccb5a0f665167eca0054cc298
Subproject commit
784dd4122afe0f68ac2d0f903c0625b9c7e50b4f
This diff is collapsed.
Click to expand it.
Stéphane Adjemian
@stepan-a
mentioned in commit
5d2b7720
·
3 years ago
mentioned in commit
5d2b7720
mentioned in commit 5d2b772042a34c8b0bf985144ca46a10121d7963
Toggle commit list
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