Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Dynare
dynare
Commits
f19decf2
Verified
Commit
f19decf2
authored
Jan 21, 2021
by
Johannes Pfeifer
Committed by
Stéphane Adjemian
Jan 22, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
non_linear_dsge_likelihood.m: consistently use options_.particles.pruning
Closes
#1756
parent
ec691741
Pipeline
#4779
passed with stages
in 111 minutes and 52 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
matlab/initial_estimation_checks.m
matlab/initial_estimation_checks.m
+3
-0
matlab/non_linear_dsge_likelihood.m
matlab/non_linear_dsge_likelihood.m
+3
-0
No files found.
matlab/initial_estimation_checks.m
View file @
f19decf2
...
...
@@ -66,6 +66,9 @@ if DynareOptions.order>1
if
DynareOptions
.
order
>
2
&&
DynareOptions
.
particle
.
pruning
==
1
error
(
'initial_estimation_checks:: the particle filter with order>2 does not support pruning'
)
end
if
DynareOptions
.
particle
.
pruning
~=
DynareOptions
.
pruning
fprintf
(
'initial_estimation_checks:: the pruning settings differ between the particle filter and the one used for IRFs/simulations. Make sure this is intended.\n'
)
end
end
non_zero_ME
=
length
(
EstimatedParameters
.
H_entries_to_check_for_positive_definiteness
);
...
...
matlab/non_linear_dsge_likelihood.m
View file @
f19decf2
...
...
@@ -143,10 +143,13 @@ switch DynareOptions.particle.initialization
StateVectorMean
=
ReducedForm
.
constant
(
mf0
);
old_DynareOptionsperiods
=
DynareOptions
.
periods
;
DynareOptions
.
periods
=
5000
;
old_DynareOptionspruning
=
DynareOptions
.
pruning
;
DynareOptions
.
pruning
=
DynareOptions
.
particle
.
pruning
;
y_
=
simult
(
DynareResults
.
steady_state
,
dr
,
Model
,
DynareOptions
,
DynareResults
);
y_
=
y_
(
dr
.
order_var
(
state_variables_idx
),
2001
:
5000
);
%state_variables_idx is in dr-order while simult_ is in declaration order
StateVectorVariance
=
cov
(
y_
'
);
DynareOptions
.
periods
=
old_DynareOptionsperiods
;
DynareOptions
.
pruning
=
old_DynareOptionspruning
;
clear
(
'old_DynareOptionsperiods'
,
'y_'
);
case
3
% Initial state vector covariance is a diagonal matrix (to be used
% if model has stochastic trends).
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment