| 1 |
//File testing error message if initial state vector is not positive definite |
| 2 |
|
| 3 |
@#include "first_spec_common.inc" |
| 4 |
|
| 5 |
varobs q ca; |
| 6 |
|
| 7 |
shocks; |
| 8 |
var eeps = 0.04^2; |
| 9 |
var nnu = 0.03^2; |
| 10 |
var q = 0.01^2; |
| 11 |
var ca = 0.01^2; |
| 12 |
end; |
| 13 |
|
| 14 |
|
| 15 |
if ~isoctave % Disabled under Octave because it takes too much time |
| 16 |
stoch_simul(order=3,periods=200, irf=0); |
| 17 |
send_endogenous_variables_to_workspace; |
| 18 |
save('my_data.mat','q','ca'); |
| 19 |
if matlab.internal.parallel.isPCTInstalled |
| 20 |
estimation(datafile='my_data.mat',order=2,mode_compute=0,mh_replic=0,filter_algorithm=sis,nonlinear_filter_initialization=2 |
| 21 |
,cova_compute=0, %tell program that no covariance matrix was computed |
| 22 |
posterior_sampling_method='hssmc', |
| 23 |
posterior_sampler_options=('steps',5, |
| 24 |
'lambda',2, |
| 25 |
'particles', 200, |
| 26 |
'scale',.5, |
| 27 |
'target', .25) |
| 28 |
); |
| 29 |
else % use less particles when not in parallel context |
| 30 |
estimation(datafile='my_data.mat',order=2,mode_compute=0,mh_replic=0,filter_algorithm=sis,nonlinear_filter_initialization=2 |
| 31 |
,cova_compute=0, %tell program that no covariance matrix was computed |
| 32 |
posterior_sampling_method='hssmc', |
| 33 |
posterior_sampler_options=('steps',5, |
| 34 |
'lambda',2, |
| 35 |
'particles', 20, |
| 36 |
'scale',.5, |
| 37 |
'target', .25) |
| 38 |
); |
| 39 |
|
| 40 |
end |
| 41 |
end |