From ebc7d6f67aaa16d36c846f5582e6fc997ace3174 Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer Date: Tue, 19 Mar 2013 20:57:15 +0100 Subject: [PATCH] Add comment why use of old correlation matrix from previous draw is correct and revert change Due to only using the diagonal of Sigma_e and the correlation matrix having ones on the diagonal, the diagonal entries of the covariance matrix are correctly built from recent draw. Later, when using the new draw for the correlations, only the correctly updated diagonal entries of Sigma_e are used. --- matlab/set_all_parameters.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matlab/set_all_parameters.m b/matlab/set_all_parameters.m index a34fbd9fe..aca559f29 100644 --- a/matlab/set_all_parameters.m +++ b/matlab/set_all_parameters.m @@ -83,7 +83,7 @@ offset = nvx+nvn; % setting shocks covariances if ~isempty(M.Correlation_matrix) - Sigma_e = diag(sqrt(diag(Sigma_e)))*M.Correlation_matrix*diag(sqrt(diag(Sigma_e))); + Sigma_e = diag(sqrt(diag(Sigma_e)))*M.Correlation_matrix*diag(sqrt(diag(Sigma_e))); % use of old correlation matrix is correct due to the diagonal structure and later only using the hence correctly updated diagonal entries of Sigma_e end if ncx corrx = estim_params.corrx;