From 6efe62a3b2069405f85b083edb59ed1020aecb51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?= Date: Tue, 17 Dec 2013 14:14:51 +0100 Subject: [PATCH] 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. --- matlab/ep/extended_path.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matlab/ep/extended_path.m b/matlab/ep/extended_path.m index 0efdfeb12..bc98ed25a 100644 --- a/matlab/ep/extended_path.m +++ b/matlab/ep/extended_path.m @@ -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