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
5740e2f0
Commit
5740e2f0
authored
6 years ago
by
Stéphane Adjemian
Browse files
Options
Downloads
Patches
Plain Diff
Updated examples for nonlinear filters.
parent
e1821e9b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/particle/dsge_base2.mod
+20
-12
20 additions, 12 deletions
tests/particle/dsge_base2.mod
with
20 additions
and
12 deletions
tests/particle/dsge_base2.mod
+
20
−
12
View file @
5740e2f0
// DGP
// DGP
@#ifndef RISKY_CALIBRATION
@#ifndef RISKY_CALIBRATION
@#define RISKY_CALIBRATION =
0
@#define RISKY_CALIBRATION =
1
@#endif
@#endif
@#ifndef EXTREME_CALIBRATION
@#ifndef EXTREME_CALIBRATION
@#define EXTREME_CALIBRATION =
1
@#define EXTREME_CALIBRATION =
0
@#endif
@#endif
@#ifndef BENCHMARK_CALIBRATION
@#ifndef BENCHMARK_CALIBRATION
@#define BENCHMARK_CALIBRATION = 0
@#define BENCHMARK_CALIBRATION = 0
...
@@ -13,8 +13,11 @@
...
@@ -13,8 +13,11 @@
@#ifndef LINEAR_KALMAN
@#ifndef LINEAR_KALMAN
@#define LINEAR_KALMAN = 0
@#define LINEAR_KALMAN = 0
@#endif
@#endif
@#ifndef NON_LINEAR_KALMAN
@#define NON_LINEAR_KALMAN = 0
@#endif
@#ifndef ALGO_SIR
@#ifndef ALGO_SIR
@#define ALGO_SIR =
0
@#define ALGO_SIR =
1
@#endif
@#endif
@#ifndef ALGO_SISmoothR
@#ifndef ALGO_SISmoothR
@#define ALGO_SISmoothR = 0
@#define ALGO_SISmoothR = 0
...
@@ -29,7 +32,7 @@
...
@@ -29,7 +32,7 @@
@#define ALGO_GCF = 0
@#define ALGO_GCF = 0
@#endif
@#endif
@#ifndef ALGO_GUF
@#ifndef ALGO_GUF
@#define ALGO_GUF =
1
@#define ALGO_GUF =
0
@#endif
@#endif
@#ifndef ALGO_GMPF
@#ifndef ALGO_GMPF
@#define ALGO_GMPF = 0
@#define ALGO_GMPF = 0
...
@@ -86,7 +89,7 @@ stderr l, uniform_pdf,,, 0.00001, 0.1;
...
@@ -86,7 +89,7 @@ stderr l, uniform_pdf,,, 0.00001, 0.1;
stderr i, uniform_pdf,,, 0.00001, 0.1;
stderr i, uniform_pdf,,, 0.00001, 0.1;
end;
end;
@#if
RISKY
_CALIBRATION
@#if
EXTREME
_CALIBRATION
estimated_params_init;
estimated_params_init;
alp, 0.4;
alp, 0.4;
bet, 0.99;
bet, 0.99;
...
@@ -101,7 +104,7 @@ end;
...
@@ -101,7 +104,7 @@ end;
end;
end;
@#endif
@#endif
@#if
EXTREME
_CALIBRATION
@#if
RISKY
_CALIBRATION
estimated_params_init;
estimated_params_init;
alp, 0.4;
alp, 0.4;
bet, 0.99;
bet, 0.99;
...
@@ -118,8 +121,9 @@ end;
...
@@ -118,8 +121,9 @@ end;
varobs y l i ;
varobs y l i ;
options_.mode_check.neighbourhood_size = .
0
1 ;
options_.mode_check.neighbourhood_size = .1 ;
options_.mode_check.number_of_points = 250;
options_.mode_check.number_of_points = 250;
options_.threads.local_state_space_iteration_2 = 4;
@#if EXTREME_CALIBRATION
@#if EXTREME_CALIBRATION
data(file='./extreme.m');
data(file='./extreme.m');
...
@@ -135,11 +139,15 @@ options_.mode_check.number_of_points = 250;
...
@@ -135,11 +139,15 @@ options_.mode_check.number_of_points = 250;
@#if LINEAR_KALMAN
@#if LINEAR_KALMAN
% estimation(nograph,order=1,mode_compute=8,mh_replic=0,mode_check);
estimation(nograph,order=1,mode_compute=8,mh_replic=0,mode_check);
@#endif
@#if NON_LINEAR_KALMAN
estimation(nograph,order=2,filter_algorithm=nlkf,mode_compute=8,mh_replic=0);
@#endif
@#endif
@#if ALGO_SIR
@#if ALGO_SIR
estimation(order=2,nograph,number_of_particles=1000,mh_replic=0,mode_compute=8
,mode_check
);
estimation(order=2,nograph,number_of_particles=1000,mh_replic=0,mode_compute=8);
@#endif
@#endif
@#if ALGO_SISmoothR
@#if ALGO_SISmoothR
...
@@ -149,7 +157,7 @@ options_.mode_check.number_of_points = 250;
...
@@ -149,7 +157,7 @@ options_.mode_check.number_of_points = 250;
@#endif
@#endif
@#if ALGO_APF
@#if ALGO_APF
estimation(order=2,nograph,filter_algorithm=apf,number_of_particles=1000,mh_replic=0,mode_compute=8,mode_check);
estimation(order=2,nograph,filter_algorithm=apf,number_of_particles=1000
0,resampling=none
,mh_replic=0,mode_compute=8,mode_check);
@#endif
@#endif
@#if ALGO_GPF
@#if ALGO_GPF
...
@@ -163,7 +171,7 @@ options_.mode_check.number_of_points = 250;
...
@@ -163,7 +171,7 @@ options_.mode_check.number_of_points = 250;
@#endif
@#endif
@#if ALGO_GUF
@#if ALGO_GUF
estimation(order=2,nograph,filter_algorithm=gf,proposal_approximation=unscented,distribution_approximation=unscented,mh_replic=0,mode_compute=
4
);
estimation(order=2,nograph,filter_algorithm=gf,proposal_approximation=unscented,distribution_approximation=unscented,mh_replic=0,mode_compute=
8
);
estimation(order=2,nograph,filter_algorithm=gf,proposal_approximation=unscented,distribution_approximation=unscented,mh_replic=0,mode_compute=8,mode_check);
estimation(order=2,nograph,filter_algorithm=gf,proposal_approximation=unscented,distribution_approximation=unscented,mh_replic=0,mode_compute=8,mode_check);
@#endif
@#endif
...
...
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