If option mode_file is used in the estimation command, replace the covariance of the
jumping distribution by an identity matrix when the covariance matrix obtained with a previous call to another optimization routine is not positive definite. git-svn-id: https://www.dynare.org/svn/dynare/trunk@2646 ac1d8469-bf42-47a9-8791-bf33cf982152time-shift
parent
6a4a414a3b
commit
349630ba85
|
@ -97,7 +97,11 @@ isux = 0; jsux = 0; test = 0;
|
|||
ix2 = ModePar;% initial condition!
|
||||
ilogpo2 = - feval(ObjFun,ix2,varargin{:});% initial posterior density
|
||||
mlogpo2 = ilogpo2;
|
||||
dd = transpose(chol(CovJump));
|
||||
try
|
||||
dd = transpose(chol(CovJump));
|
||||
catch
|
||||
dd = eye(length(CovJump));
|
||||
end
|
||||
while j<=MaxNumberOfTuningSimulations
|
||||
proposal = iScale*dd*randn(npar,1) + ix2;
|
||||
if all(proposal > mh_bounds(:,1)) & all(proposal < mh_bounds(:,2))
|
||||
|
|
Loading…
Reference in New Issue