Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Marco Ratto
dynare
Commits
d4bfd6c9
Verified
Commit
d4bfd6c9
authored
Oct 06, 2018
by
Stéphane Adjemian
Browse files
Another attempt to fix numerical accuracy issues in integration tests.
parent
e5317b17
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/kalman/likelihood_from_dynare/fs2000_estimation_check.inc
View file @
d4bfd6c9
%%
default
options_
.
lik_init
=
1
;
estimation
(
kalman_algo
=
0
,
mode_compute
=
8
,
order
=
1
,
datafile
=@
{
data_file_name
},
smoother
,
filter_decomposition
,
forecast
=
8
,
filtered_vars
,
filter_step_ahead
=
[
1
,
3
],
irf
=
20
)
m
P
c
e
W
R
k
d
y
gy_obs
;
estimation
(
kalman_algo
=
0
,
mode_compute
=
4
,
order
=
1
,
datafile
=@
{
data_file_name
},
smoother
,
filter_decomposition
,
forecast
=
8
,
filtered_vars
,
filter_step_ahead
=
[
1
,
3
],
irf
=
20
)
m
P
c
e
W
R
k
d
y
gy_obs
;
fval_algo_0
=
oo_
.
likelihood_at_initial_parameters
;
%%
Multivariate
Kalman
Filter
options_
.
lik_init
=
1
;
...
...
@@ -52,15 +52,15 @@ SmoothedShocks(:,:,6)=cell2mat(struct2cell(oo_.SmoothedShocks));
SmoothedVariables
(
:
,
:
,
6
)
=
cell2mat
(
struct2cell
(
oo_
.
SmoothedVariables
));
if
max
(
max
(
abs
(
SmoothedMeasurementErrors
-
repmat
(
SmoothedMeasurementErrors
(
:
,
:
,
1
),[
1
,
1
,
6
]))))
>
1
e
-
8
if
max
(
max
(
abs
(
SmoothedMeasurementErrors
-
repmat
(
SmoothedMeasurementErrors
(
:
,
:
,
1
),[
1
,
1
,
6
]))))
>
1
e
-
6
error
(
'SmoothedMeasurementErrors do not match'
)
end
if
max
(
max
(
abs
(
SmoothedShocks
-
repmat
(
SmoothedShocks
(
:
,
:
,
1
),[
1
,
1
,
6
]))))
>
1
e
-
8
if
max
(
max
(
abs
(
SmoothedShocks
-
repmat
(
SmoothedShocks
(
:
,
:
,
1
),[
1
,
1
,
6
]))))
>
1
e
-
6
error
(
'SmoothedShocks do not match'
)
end
if
max
(
max
(
abs
(
SmoothedVariables
-
repmat
(
SmoothedVariables
(
:
,
:
,
1
),[
1
,
1
,
6
]))))
>
1
e
-
8
if
max
(
max
(
abs
(
SmoothedVariables
-
repmat
(
SmoothedVariables
(
:
,
:
,
1
),[
1
,
1
,
6
]))))
>
1
e
-
6
error
(
'SmoothedVariables do not match'
)
end
...
...
Write
Preview
Supports
Markdown
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