Skip to content
Snippets Groups Projects
Commit 230e787b authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Fixed bug. The seed has to be set before the sampling of the structural innovations.

parent 7408714e
Branches
Tags
No related merge requests found
......@@ -88,6 +88,11 @@ covariance_matrix = M_.Sigma_e(positive_var_indx,positive_var_indx);
number_of_structural_innovations = length(covariance_matrix);
covariance_matrix_upper_cholesky = chol(covariance_matrix);
% Set seed.
if options_.ep.set_dynare_seed_to_default
set_dynare_seed('default');
end
% Simulate shocks.
switch options_.ep.innovation_distribution
case 'gaussian'
......@@ -99,11 +104,6 @@ end
% Initializes some variables.
t = 0;
% Set seed.
if options_.ep.set_dynare_seed_to_default
set_dynare_seed('default');
end
graphic_waitbar_flag = ~( options_.console_mode || exist('OCTAVE_VERSION') );
% Set waitbar (graphic mode)
......@@ -116,7 +116,7 @@ else
back = [];
end
end
% Main loop.
while (t<sample_size)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment