Testsuite / pac: Octave compatibility fix
Use a different random seed under Octave for several tests. Note that these tests seems fragile. Changing the seed under MATLAB often leads to a failure.time-shift
parent
901d8355e3
commit
e4af502360
|
@ -85,6 +85,11 @@ pac.update.expectation('pacman');
|
||||||
initialconditions = dseries(zeros(10, M_.endo_nbr+M_.exo_nbr), 2000Q1, vertcat(M_.endo_names,M_.exo_names));
|
initialconditions = dseries(zeros(10, M_.endo_nbr+M_.exo_nbr), 2000Q1, vertcat(M_.endo_names,M_.exo_names));
|
||||||
|
|
||||||
// Simulate the model for 500 periods
|
// Simulate the model for 500 periods
|
||||||
|
if isoctave
|
||||||
|
// Use a different seed under Octave, the OLS estimation fails with the default one
|
||||||
|
options_.bnlms.set_dynare_seed_to_default = false;
|
||||||
|
set_dynare_seed(4);
|
||||||
|
end
|
||||||
TrueData = simul_backward_model(initialconditions, 5000);
|
TrueData = simul_backward_model(initialconditions, 5000);
|
||||||
|
|
||||||
// Define a structure describing the parameters to be estimated (with initial conditions).
|
// Define a structure describing the parameters to be estimated (with initial conditions).
|
||||||
|
@ -148,4 +153,4 @@ end
|
||||||
|
|
||||||
if abs(lambda_nls-lambda_iterative_ols)>.01
|
if abs(lambda_nls-lambda_iterative_ols)>.01
|
||||||
error('Iterative OLS and NLS do not provide consistent estimates (lambda)')
|
error('Iterative OLS and NLS do not provide consistent estimates (lambda)')
|
||||||
end
|
end
|
||||||
|
|
|
@ -86,6 +86,11 @@ pac.update.expectation('pacman');
|
||||||
initialconditions = dseries(zeros(10, M_.endo_nbr+M_.exo_nbr), 2000Q1, vertcat(M_.endo_names,M_.exo_names));
|
initialconditions = dseries(zeros(10, M_.endo_nbr+M_.exo_nbr), 2000Q1, vertcat(M_.endo_names,M_.exo_names));
|
||||||
|
|
||||||
// Simulate the model for 500 periods
|
// Simulate the model for 500 periods
|
||||||
|
if isoctave
|
||||||
|
// Use a different seed under Octave, the OLS estimation fails with the default one
|
||||||
|
options_.bnlms.set_dynare_seed_to_default = false;
|
||||||
|
set_dynare_seed(4);
|
||||||
|
end
|
||||||
TrueData = simul_backward_model(initialconditions, 5000);
|
TrueData = simul_backward_model(initialconditions, 5000);
|
||||||
|
|
||||||
// Define a structure describing the parameters to be estimated (with initial conditions).
|
// Define a structure describing the parameters to be estimated (with initial conditions).
|
||||||
|
@ -157,4 +162,4 @@ end
|
||||||
|
|
||||||
if abs(lambda_nls-lambda_iterative_ols)>.01
|
if abs(lambda_nls-lambda_iterative_ols)>.01
|
||||||
error('Iterative OLS and NLS do not provide consistent estimates (lambda)')
|
error('Iterative OLS and NLS do not provide consistent estimates (lambda)')
|
||||||
end
|
end
|
||||||
|
|
|
@ -91,6 +91,11 @@ pac.update.expectation('pacman');
|
||||||
initialconditions = dseries(zeros(10, M_.endo_nbr+M_.exo_nbr), 2000Q1, vertcat(M_.endo_names,M_.exo_names));
|
initialconditions = dseries(zeros(10, M_.endo_nbr+M_.exo_nbr), 2000Q1, vertcat(M_.endo_names,M_.exo_names));
|
||||||
|
|
||||||
// Simulate the model for 500 periods
|
// Simulate the model for 500 periods
|
||||||
|
if isoctave
|
||||||
|
// Use a different seed under Octave, the OLS estimation fails with the default one
|
||||||
|
options_.bnlms.set_dynare_seed_to_default = false;
|
||||||
|
set_dynare_seed(5);
|
||||||
|
end
|
||||||
TrueData = simul_backward_model(initialconditions, 5000);
|
TrueData = simul_backward_model(initialconditions, 5000);
|
||||||
|
|
||||||
// Define a structure describing the parameters to be estimated (with initial conditions).
|
// Define a structure describing the parameters to be estimated (with initial conditions).
|
||||||
|
@ -162,4 +167,4 @@ end
|
||||||
|
|
||||||
if abs(lambda_nls-lambda_iterative_ols)>.01
|
if abs(lambda_nls-lambda_iterative_ols)>.01
|
||||||
error('Iterative OLS and NLS do not provide consistent estimates (lambda)')
|
error('Iterative OLS and NLS do not provide consistent estimates (lambda)')
|
||||||
end
|
end
|
||||||
|
|
|
@ -91,6 +91,11 @@ pac.update.expectation('pacman');
|
||||||
initialconditions = dseries(zeros(10, M_.endo_nbr+M_.exo_nbr), 2000Q1, vertcat(M_.endo_names,M_.exo_names));
|
initialconditions = dseries(zeros(10, M_.endo_nbr+M_.exo_nbr), 2000Q1, vertcat(M_.endo_names,M_.exo_names));
|
||||||
|
|
||||||
// Simulate the model for 500 periods
|
// Simulate the model for 500 periods
|
||||||
|
if isoctave
|
||||||
|
// Use a different seed under Octave, the OLS estimation fails with the default one
|
||||||
|
options_.bnlms.set_dynare_seed_to_default = false;
|
||||||
|
set_dynare_seed(5);
|
||||||
|
end
|
||||||
TrueData = simul_backward_model(initialconditions, 5000);
|
TrueData = simul_backward_model(initialconditions, 5000);
|
||||||
|
|
||||||
// Define a structure describing the parameters to be estimated (with initial conditions).
|
// Define a structure describing the parameters to be estimated (with initial conditions).
|
||||||
|
@ -152,4 +157,4 @@ end
|
||||||
|
|
||||||
if abs(lambda_nls-lambda_iterative_ols)>.01
|
if abs(lambda_nls-lambda_iterative_ols)>.01
|
||||||
error('Iterative OLS and NLS do not provide consistent estimates (lambda)')
|
error('Iterative OLS and NLS do not provide consistent estimates (lambda)')
|
||||||
end
|
end
|
||||||
|
|
|
@ -101,6 +101,11 @@ pac.update.expectation('pacman');
|
||||||
initialconditions = dseries(zeros(10, M_.endo_nbr+M_.exo_nbr), 2000Q1, vertcat(M_.endo_names,M_.exo_names));
|
initialconditions = dseries(zeros(10, M_.endo_nbr+M_.exo_nbr), 2000Q1, vertcat(M_.endo_names,M_.exo_names));
|
||||||
|
|
||||||
// Simulate the model for 500 periods
|
// Simulate the model for 500 periods
|
||||||
|
if isoctave
|
||||||
|
// Use a different seed under Octave, the OLS estimation fails with the default one
|
||||||
|
options_.bnlms.set_dynare_seed_to_default = false;
|
||||||
|
set_dynare_seed(4);
|
||||||
|
end
|
||||||
TrueData = simul_backward_model(initialconditions, 5000);
|
TrueData = simul_backward_model(initialconditions, 5000);
|
||||||
|
|
||||||
// Define a structure describing the parameters to be estimated (with initial conditions).
|
// Define a structure describing the parameters to be estimated (with initial conditions).
|
||||||
|
|
Loading…
Reference in New Issue