Updated examples.

time-shift
Stéphane Adjemian(Charybdis) 2018-05-31 13:41:27 +02:00
parent 1984d01d2a
commit 6564e4201c
3 changed files with 34 additions and 3 deletions

View File

@ -37,4 +37,19 @@ diff(z) = e_c_m*(x(-1)-z(-1)) + c_z_1*diff(z(-1)) + c_z_2*diff(z(-2)) + pac_exp
end;
get_companion_matrix('toto');
shocks;
var ex = 1.0;
var ey = 1.0;
var ez = 1.0;
end;
get_companion_matrix('toto', 'pacman');
// Update the parameters of the PAC expectation model (h0 and h1 vectors).
pac.update.equation('pacman');
// Set initial conditions to zero. Please use more sensible values if any...
initialconditions = dseries(zeros(10, M_.endo_nbr+M_.exo_nbr), 2000Q1, vertcat(M_.endo_names,M_.exo_names));
// Simulate the model for 500 periods
TrueData = simul_backward_model(initialconditions, 500);

View File

@ -47,7 +47,7 @@ end;
// Build the companion matrix of the VAR model (toto).
get_companion_matrix('toto');
get_companion_matrix('toto', 'pacman');
// Update the parameters of the PAC expectation model (h0 and h1 vectors).
pac.update.equation('pacman');

View File

@ -39,4 +39,20 @@ diff(z) = e_c_m*(x(-1)-z(-1)) + c_z_1*diff(z(-1)) + c_z_2*diff(z(-2)) + pac_exp
end;
get_companion_matrix('toto');
shocks;
var ey = 1.0;
var ex = 1.0;
var ez = 1.0;
end;
// Build the companion matrix of the VAR model (toto).
get_companion_matrix('toto', 'pacman');
// Update the parameters of the PAC expectation model (h0 and h1 vectors).
pac.update.equation('pacman');
// Set initial conditions to zero. Please use more sensible values if any...
initialconditions = dseries(zeros(10, M_.endo_nbr+M_.exo_nbr), 2000Q1, vertcat(M_.endo_names,M_.exo_names));
// Simulate the model for 500 periods
TrueData = simul_backward_model(initialconditions, 500);