Debian Codegraph @

tests/particle/linear_model.mod

raw
1 var x
2 y
3 z;
4
5 varexo u
6 v;
7
8 parameters a1 a2 a3 a4
9 b1 b2 b3
10 c1;
11
12 a1 = .50;
13 a2 = .00;
14 a3 = .70;
15 a4 = .40;
16 b1 = .90;
17 b2 = .00;
18 b3 = .80;
19 c1 = .95;
20
21
22 model;
23 y = a1*x(-1) + a2*x(1) + a3*z + a4*y(-1);
24 z = b1*z(-1) + b2*z(1) + b3*x + u;
25 x = c1*x(-1) + v;
26 end;
27
28 shocks;
29 var u; stderr .05;
30 var v; stderr .05;
31 end;
32
33 steady;
34
35 check;
36
37 stoch_simul(irf=0, periods=10000);
38
39 datatomfile('linear_model_data');
40
41
42 estimated_params;
43 a1, .50;
44 a2, .00;
45 a3, .70;
46 a4, .40;
47 b1, .90;
48 b2, .00;
49 b3, .80;
50 c1, .95;
51 stderr u, .05;
52 stderr v, .05;
53 end;
54
55 varobs y, z;
56
57
58 options_.particle.status = 1;
59 options_.particle.initialization = 1;
60 options_.particle.pruning = false;
61 options_.particle.number_of_particles = 20000;
62 options_.particle.resampling.status = 'systematic';
63 options_.particle.resampling.neff_threshold = .1;
64
65 options_.gstep(1) = 1e-4;
66 options_.gstep(2) = .1;
67
68 options_.mode_check_neighbourhood_size = 0.05;
69
70 set_dynare_threads('local_state_space_iteration_2',3);
71
72
73 estimation(order=2,nobs=100,datafile=linear_model_data,mh_replic=0,filter_algorithm=sis);