Transposed the definition of the innovations in (stochastic) extended path routine, so that, for a given state of the random number generator, stochastic simulations obtained with extended_path and stoch_simul commands consider the same innovations (when the number of shocks is greater than one). Otherwise the stochastic simulations cannot be compared.

time-shift
Stéphane Adjemian (Charybdis) 2013-12-17 14:14:51 +01:00
parent 8ddd7d0300
commit 6efe62a3b2
1 changed files with 1 additions and 1 deletions

View File

@ -115,7 +115,7 @@ bytecode_flag = options_.ep.use_bytecode;
% Simulate shocks.
switch options_.ep.innovation_distribution
case 'gaussian'
oo_.ep.shocks = randn(sample_size,effective_number_of_shocks)*covariance_matrix_upper_cholesky;
oo_.ep.shocks = transpose(transpose(covariance_matrix_upper_cholesky)*randn(effective_number_of_shocks,sample_size));
otherwise
error(['extended_path:: ' options_.ep.innovation_distribution ' distribution for the structural innovations is not (yet) implemented!'])
end