Document different treatment of mh_recover and load_mh_file under Octave
Also adjusts unit tests accordingly. Closes #1332time-shift
parent
2d17ff43a4
commit
5e010f57c0
|
@ -5304,7 +5304,9 @@ simulation that crashed prematurely, starting with the last available saved
|
|||
the proposal density from the previous run will automatically be loaded. In older versions,
|
||||
to assure a neat continuation of the chain with the same proposal density, you should
|
||||
provide the @code{mode_file} used in the previous
|
||||
run or the same user-defined @code{mcmc_jumping_covariance} when using this option.
|
||||
run or the same user-defined @code{mcmc_jumping_covariance} when using this option. Note that
|
||||
under Octave, a neat continuation of the crashed chain with the respective last random number
|
||||
generator state is currently not supported.
|
||||
|
||||
@item mh_mode = @var{INTEGER}
|
||||
@dots{}
|
||||
|
@ -5476,7 +5478,9 @@ the proposal density from the previous run will automatically be loaded. In olde
|
|||
to assure a neat continuation of the chain with the same proposal density, you should
|
||||
provide the @code{mode_file} used in the previous
|
||||
run or the same user-defined @code{mcmc_jumping_covariance} when using this option.
|
||||
Shouldn't be used together with @code{mh_recover}.
|
||||
Shouldn't be used together with @code{mh_recover}. Note that under Octave, a neat
|
||||
continuation of the chain with the last random number
|
||||
generator state of the already present draws is currently not supported.
|
||||
|
||||
@item load_results_after_load_mh
|
||||
@anchor{load_results_after_load_mh} This option is available when loading a previous MCMC run without
|
||||
|
|
|
@ -26,10 +26,12 @@ if max(max(abs(temp1.x2-temp2.x2)))>1e-10
|
|||
error('Draws of affected chain''s unaffected files are not the same')
|
||||
end
|
||||
|
||||
%check second, affected chain with affected file
|
||||
temp1=load([M_.dname '_mh2_blck2.mat']);
|
||||
temp2=load([M_.dname filesep 'metropolis' filesep M_.dname '_mh2_blck2.mat']);
|
||||
if ~isoctave
|
||||
%check second, affected chain with affected file
|
||||
temp1=load([M_.dname '_mh2_blck2.mat']);
|
||||
temp2=load([M_.dname filesep 'metropolis' filesep M_.dname '_mh2_blck2.mat']);
|
||||
|
||||
if max(max(abs(temp1.x2-temp2.x2)))>1e-10
|
||||
error('Draws of affected chain''s affected files are not the same')
|
||||
end
|
||||
if max(max(abs(temp1.x2-temp2.x2)))>1e-10
|
||||
error('Draws of affected chain''s affected files are not the same')
|
||||
end
|
||||
end
|
|
@ -32,18 +32,21 @@ if max(max(abs(temp1.x2-temp2.x2)))>1e-10
|
|||
error('Draws of affected chain''s unaffected files are not the same')
|
||||
end
|
||||
|
||||
%check second, affected chain with affected file
|
||||
temp1=load([M_.dname '_mh4_blck2.mat']);
|
||||
temp2=load([M_.dname filesep 'metropolis' filesep M_.dname '_mh4_blck2.mat']);
|
||||
if ~isoctave
|
||||
%check second, affected chain with affected file
|
||||
temp1=load([M_.dname '_mh4_blck2.mat']);
|
||||
temp2=load([M_.dname filesep 'metropolis' filesep M_.dname '_mh4_blck2.mat']);
|
||||
|
||||
if max(max(abs(temp1.x2-temp2.x2)))>1e-10
|
||||
error('Draws of affected chain''s affected files are not the same')
|
||||
if max(max(abs(temp1.x2-temp2.x2)))>1e-10
|
||||
error('Draws of affected chain''s affected files are not the same')
|
||||
end
|
||||
|
||||
%check second, affected chain with affected file
|
||||
temp1=load([M_.dname '_mh5_blck2.mat']);
|
||||
temp2=load([M_.dname filesep 'metropolis' filesep M_.dname '_mh5_blck2.mat']);
|
||||
|
||||
if max(max(abs(temp1.x2-temp2.x2)))>1e-10
|
||||
error('Draws of affected chain''s affected files are not the same')
|
||||
end
|
||||
end
|
||||
|
||||
%check second, affected chain with affected file
|
||||
temp1=load([M_.dname '_mh5_blck2.mat']);
|
||||
temp2=load([M_.dname filesep 'metropolis' filesep M_.dname '_mh5_blck2.mat']);
|
||||
|
||||
if max(max(abs(temp1.x2-temp2.x2)))>1e-10
|
||||
error('Draws of affected chain''s affected files are not the same')
|
||||
end
|
||||
|
|
@ -30,10 +30,12 @@ if max(max(abs(temp1.x2-temp2.x2)))>1e-10
|
|||
error('Draws of affected chain''s unaffected files are not the same')
|
||||
end
|
||||
|
||||
%check second, affected chain with affected file
|
||||
temp1=load([M_.dname '_mh4_blck2.mat']);
|
||||
temp2=load([M_.dname filesep 'metropolis' filesep M_.dname '_mh4_blck2.mat']);
|
||||
if ~isoctave
|
||||
%check second, affected chain with affected file
|
||||
temp1=load([M_.dname '_mh4_blck2.mat']);
|
||||
temp2=load([M_.dname filesep 'metropolis' filesep M_.dname '_mh4_blck2.mat']);
|
||||
|
||||
if max(max(abs(temp1.x2-temp2.x2)))>1e-10
|
||||
error('Draws of affected chain''s affected files are not the same')
|
||||
if max(max(abs(temp1.x2-temp2.x2)))>1e-10
|
||||
error('Draws of affected chain''s affected files are not the same')
|
||||
end
|
||||
end
|
|
@ -26,10 +26,12 @@ if max(max(abs(temp1.x2-temp2.x2)))>1e-10
|
|||
error('Draws of affected chain''s unaffected files are not the same')
|
||||
end
|
||||
|
||||
%check second, affected chain with affected file
|
||||
temp1=load([M_.dname '_mh2_blck2.mat']);
|
||||
temp2=load([M_.dname filesep 'metropolis' filesep M_.dname '_mh2_blck2.mat']);
|
||||
if ~isoctave
|
||||
%check second, affected chain with affected file
|
||||
temp1=load([M_.dname '_mh2_blck2.mat']);
|
||||
temp2=load([M_.dname filesep 'metropolis' filesep M_.dname '_mh2_blck2.mat']);
|
||||
|
||||
if max(max(abs(temp1.x2-temp2.x2)))>1e-10
|
||||
error('Draws of affected chain''s affected files are not the same')
|
||||
end
|
||||
if max(max(abs(temp1.x2-temp2.x2)))>1e-10
|
||||
error('Draws of affected chain''s affected files are not the same')
|
||||
end
|
||||
end
|
|
@ -111,10 +111,12 @@ estimation(mode_compute=0,mode_file=fs2000_mode,order=1, datafile=fsdat_simul, n
|
|||
temp1=load([M_.dname '_mh1_blck1.mat']);
|
||||
temp2=load([M_.dname filesep 'metropolis' filesep M_.dname '_mh1_blck1.mat']);
|
||||
|
||||
if max(max(abs(temp1.x2-temp2.x2)))>1e-10
|
||||
error('Draws of unaffected chain are not the same')
|
||||
if ~isoctave
|
||||
if max(max(abs(temp1.x2-temp2.x2)))>1e-10
|
||||
error('Adding draws did not result in the same chain')
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
save('fs2000_result.mat','oo_')
|
||||
options_.load_results_after_load_mh=1;
|
||||
estimation(mode_compute=0,mode_file=fs2000_mode,order=1, datafile=fsdat_simul, nobs=192, loglinear, mh_replic=0, mh_nblocks=1, mh_jscale=10,load_mh_file,smoother) gy_obs gp_obs;
|
||||
|
|
Loading…
Reference in New Issue