| 1 |
var x y; |
| 2 |
varexo u v; |
| 3 |
|
| 4 |
parameters c, r; |
| 5 |
|
| 6 |
c = .500; |
| 7 |
r = .975; |
| 8 |
|
| 9 |
model; |
| 10 |
y = x + u; |
| 11 |
x = r*x(-1) + 0.0000001*x(1) + v; |
| 12 |
end; |
| 13 |
|
| 14 |
shocks; |
| 15 |
var u; stderr sqrt(0.02); |
| 16 |
var v; stderr sqrt(0.02); |
| 17 |
end; |
| 18 |
|
| 19 |
steady; |
| 20 |
|
| 21 |
check; |
| 22 |
|
| 23 |
stoch_simul(irf=0, periods=10000); |
| 24 |
|
| 25 |
datatomfile('noisy_ar1_data'); |
| 26 |
|
| 27 |
estimated_params; |
| 28 |
c, .500; |
| 29 |
r, .975; |
| 30 |
stderr u, sqrt(.2); |
| 31 |
stderr v, sqrt(.02); |
| 32 |
end; |
| 33 |
|
| 34 |
varobs y; |
| 35 |
|
| 36 |
|
| 37 |
particle = 1; |
| 38 |
|
| 39 |
if particle; |
| 40 |
options_.particle.status = 1; |
| 41 |
options_.particle.initialization = 1; |
| 42 |
options_.particle.pruning = false; |
| 43 |
options_.particle.number_of_particles = 20000; |
| 44 |
options_.particle.resampling.status = 'systematic'; |
| 45 |
options_.particle.resampling.neff_threshold = .1; |
| 46 |
|
| 47 |
options_.gstep(1) = 1e-4; |
| 48 |
options_.gstep(2) = .1; |
| 49 |
|
| 50 |
options_.mode_check_neighbourhood_size = 0.05; |
| 51 |
|
| 52 |
set_dynare_threads('local_state_space_iteration_2',3); |
| 53 |
|
| 54 |
estimation(order=2,nobs=100,datafile=linear_model_data,mh_replic=0,filter_algorithm=sis); |
| 55 |
|
| 56 |
else; |
| 57 |
|
| 58 |
estimation(nobs=100,datafile=noisy_ar1_data,mh_replic=0); |
| 59 |
|
| 60 |
end; |