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
Sébastien Villemot 2021-02-04 13:45:19 +01:00
parent 901d8355e3
commit e4af502360
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
5 changed files with 29 additions and 4 deletions

View File

@ -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));
// 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);
// 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
error('Iterative OLS and NLS do not provide consistent estimates (lambda)')
end
end

View File

@ -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));
// 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);
// 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
error('Iterative OLS and NLS do not provide consistent estimates (lambda)')
end
end

View File

@ -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));
// 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);
// 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
error('Iterative OLS and NLS do not provide consistent estimates (lambda)')
end
end

View File

@ -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));
// 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);
// 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
error('Iterative OLS and NLS do not provide consistent estimates (lambda)')
end
end

View File

@ -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));
// 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);
// Define a structure describing the parameters to be estimated (with initial conditions).