Commit ebc7d6f6 authored by Johannes Pfeifer 's avatar Johannes Pfeifer
Browse files

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.
parent 74ef1aa7
......@@ -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
if ncx
corrx = estim_params.corrx;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment