| 1 |
% Tests Identification command with ML and unit roots/diffuse filter option; |
| 2 |
% Should not work because of observed unit root variable |
| 3 |
% Created by Johannes Pfeifer (@JohannesPfeifer, [email protected]) |
| 4 |
% ========================================================================= |
| 5 |
% Copyright © 2015-2020 Dynare Team |
| 6 |
% |
| 7 |
% This file is part of Dynare. |
| 8 |
% |
| 9 |
% Dynare is free software: you can redistribute it and/or modify |
| 10 |
% it under the terms of the GNU General Public License as published by |
| 11 |
% the Free Software Foundation, either version 3 of the License, or |
| 12 |
% (at your option) any later version. |
| 13 |
% |
| 14 |
% Dynare is distributed in the hope that it will be useful, |
| 15 |
% but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 |
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 |
% GNU General Public License for more details. |
| 18 |
% |
| 19 |
% You should have received a copy of the GNU General Public License |
| 20 |
% along with Dynare. If not, see <https://www.gnu.org/licenses/>. |
| 21 |
% ========================================================================= |
| 22 |
var y x z delta_y; |
| 23 |
|
| 24 |
varexo eps_x eps_z; |
| 25 |
|
| 26 |
parameters rho sigma_z sigma_x; |
| 27 |
|
| 28 |
// set parameter values |
| 29 |
sigma_z=0.001; |
| 30 |
sigma_x=0.01; |
| 31 |
rho=0.9; |
| 32 |
|
| 33 |
model; |
| 34 |
z=rho*z(-1)+sigma_z*eps_z; |
| 35 |
x=x(-1)+sigma_x*eps_x; |
| 36 |
y=x+z; |
| 37 |
delta_y=y-y(-1); |
| 38 |
end; |
| 39 |
|
| 40 |
steady_state_model; |
| 41 |
x=0; |
| 42 |
z=0; |
| 43 |
y=0; |
| 44 |
delta_y=0; |
| 45 |
end; |
| 46 |
|
| 47 |
//set shock variances |
| 48 |
shocks; |
| 49 |
var eps_z=1; |
| 50 |
var eps_x=1; |
| 51 |
end; |
| 52 |
|
| 53 |
steady; |
| 54 |
check; |
| 55 |
varobs y delta_y; |
| 56 |
stoch_simul(order=1,irf=0); |
| 57 |
|
| 58 |
|
| 59 |
estimated_params; |
| 60 |
rho, 0.9; |
| 61 |
sigma_z, 0.01; |
| 62 |
sigma_x, 0.01; |
| 63 |
end; |
| 64 |
identification(diffuse_filter,advanced=1,prior_trunc=0); |