function COV = myproposalcov(~,HESS,BOUNDHIT,~,S,~)
% MYPROPOSALCOV  [Not a public function] Approx cov matrix of the parameter estimates of parameters with slack constraint.
%
% Backed IRIS function.
% No help provided.

% -IRIS Toolbox.
% -Copyright (c) 2007-2012 Jaromir Benes.

%**************************************************************************

np = length(S.plist);
COV = nan(np);

% Approximate Hessian from optimization procedure.
F = HESS{1}(~BOUNDHIT,~BOUNDHIT);

% Invert information matrix to approximate cov matrix.
COV(~BOUNDHIT,~BOUNDHIT) = inv(F);

end