Bug fix for mode_compute=6.
We did not keep track of the first and second order moment when calling gmhmaxlik_core.bgp-dev
parent
982ec2e66d
commit
e5102eeefd
|
@ -149,6 +149,7 @@ j = 1;
|
|||
isux = 0;
|
||||
ilogpo2 = - feval(ObjFun,ix2,varargin{:});
|
||||
while j<= NumberOfIterations
|
||||
j = j+1;
|
||||
proposal = iScale*dd*randn(npar,1) + ix2;
|
||||
if all(proposal > mh_bounds(:,1)) && all(proposal < mh_bounds(:,2))
|
||||
logpo2 = - feval(ObjFun,proposal,varargin{:});
|
||||
|
@ -175,7 +176,6 @@ while j<= NumberOfIterations
|
|||
MeanPar = oldMeanPar + (1/j)*(ix2-oldMeanPar);
|
||||
CovJump = CovJump + oldMeanPar*oldMeanPar' - MeanPar*MeanPar' + ...
|
||||
(1/j)*(ix2*ix2' - CovJump - oldMeanPar*oldMeanPar');
|
||||
j = j+1;
|
||||
end
|
||||
dyn_waitbar_close(hh);
|
||||
PostVar = CovJump;
|
||||
|
|
Loading…
Reference in New Issue