bug fix: with option mh_initialize_from_previous_mcmc, we need also to check if some prior changed, which may lead last draw in previous mcmc falling outside new prior bounds.
parent
de152a3de3
commit
aad5c36081
|
@ -171,6 +171,12 @@ if ~options_.load_mh_file && ~options_.mh_recover
|
|||
ilogpo2 = zeros(NumberOfBlocks,1);
|
||||
ilogpo2(:,1) = record0.LastLogPost;
|
||||
ix2(:,IA) = record0.LastParameters(:,IB);
|
||||
for j=1:NumberOfBlocks
|
||||
if not(all(ix2(j,:)' >= mh_bounds.lb) && all(ix2(j,:)' <= mh_bounds.ub))
|
||||
new_estimated_parameters = logical(new_estimated_parameters + (ix2(j,:)' < mh_bounds.lb));
|
||||
new_estimated_parameters = logical(new_estimated_parameters + (ix2(j,:)' > mh_bounds.ub));
|
||||
end
|
||||
end
|
||||
else
|
||||
new_estimated_parameters = true(1,npar);
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue