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
0752d6a8
Commit
0752d6a8
authored
8 years ago
by
Marco Ratto
Committed by
Stéphane Adjemian
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Trap incompatible user define options in a more transparent way. Fixes
#1016
.
parent
727a9582
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
matlab/dynare_sensitivity.m
+33
-0
33 additions, 0 deletions
matlab/dynare_sensitivity.m
with
33 additions
and
0 deletions
matlab/dynare_sensitivity.m
+
33
−
0
View file @
0752d6a8
...
...
@@ -31,6 +31,39 @@ fname_ = M_.fname;
lgy_
=
M_
.
endo_names
;
x0
=
[];
% check user defined options
if
isfield
(
options_gsa
,
'neighborhood_width'
)
&&
options_gsa
.
neighborhood_width
,
if
isfield
(
options_gsa
,
'pprior'
)
&&
options_gsa
.
pprior
,
error
(
'sensitivity:: neighborhood_width is incompatible with prior sampling'
)
end
if
isfield
(
options_gsa
,
'ppost'
)
&&
options_gsa
.
ppost
,
error
(
'sensitivity:: neighborhood_width is incompatible with posterior sampling'
)
end
end
if
isfield
(
options_gsa
,
'morris'
)
&&
options_gsa
.
morris
==
1
,
if
isfield
(
options_gsa
,
'identification'
)
&&
options_gsa
.
identification
==
0
,
% options_gsa.redform=1;
end
if
isfield
(
options_gsa
,
'ppost'
)
&&
options_gsa
.
ppost
,
error
(
'sensitivity:: Morris is incompatible with posterior sampling'
)
elseif
isfield
(
options_gsa
,
'pprior'
)
&&
options_gsa
.
pprior
==
0
,
if
~
(
isfield
(
options_gsa
,
'neighborhood_width'
)
&&
options_gsa
.
neighborhood_width
),
error
(
'sensitivity:: Morris is incompatible with MC sampling with correlation matrix'
)
end
end
if
isfield
(
options_gsa
,
'rmse'
)
&&
options_gsa
.
rmse
,
error
(
'sensitivity:: Morris is incompatible with rmse analysis'
)
end
if
(
isfield
(
options_gsa
,
'alpha2_stab'
)
&&
options_gsa
.
alpha2_stab
<
1
)
||
...
(
isfield
(
options_gsa
,
'ksstat'
)
&&
options_gsa
.
ksstat
<
1
)
||
...
(
isfield
(
options_gsa
,
'pvalue_ks'
)
&&
options_gsa
.
pvalue_ks
)
||
...
(
isfield
(
options_gsa
,
'pvalue_corr'
)
&&
options_gsa
.
pvalue_corr
)
error
(
'sensitivity:: Morris is incompatible with Monte Carlo filtering'
)
end
end
% end check user defined options
options_gsa
=
set_default_option
(
options_gsa
,
'datafile'
,[]);
options_gsa
=
set_default_option
(
options_gsa
,
'rmse'
,
0
);
options_gsa
=
set_default_option
(
options_gsa
,
'useautocorr'
,
0
);
...
...
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