Skip to content
Snippets Groups Projects
Verified Commit bd3ca587 authored by Willi Mutschler's avatar Willi Mutschler
Browse files

method_of_moments: remove spurious diag(diag(x))

parent 65f8b56f
Branches
No related tags found
No related merge requests found
......@@ -337,7 +337,7 @@ elseif strcmp(options_mom_.mom.mom_method,'GMM') || strcmp(options_mom_.mom.mom_
if options_mom_.mom.vector_output == 1 % lsqnonlin requires vector output
fval = residuals;
if options_mom_.mom.penalized_estimator
fval=[fval;(xparam-bayestopt_.p1)./sqrt(diag(diag(bayestopt_.p2.^2)))];
fval=[fval;(xparam-bayestopt_.p1)./bayestopt_.p2];
end
else
fval = Q;
......@@ -354,7 +354,7 @@ elseif strcmp(options_mom_.mom.mom_method,'GMM') || strcmp(options_mom_.mom.mom_
dresiduals = sqrt(options_mom_.mom.weighting_matrix_scaling_factor)*weighting_info.Sw*dmoments_difference;
if options_mom_.mom.vector_output == 1 % lsqnonlin requires vector output
if options_mom_.mom.penalized_estimator
df(:,jp)=[dresiduals;dxparam(:,jp)./sqrt(diag(diag(bayestopt_.p2.^2)))];
df(:,jp)=[dresiduals;dxparam(:,jp)./bayestopt_.p2];
else
df(:,jp) = dresiduals;
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment