Fixed bug (options_.varobs is a row cell array of strings) + Cosmetic changes.
parent
195a3f8fff
commit
11f00d041e
|
@ -106,7 +106,7 @@ if horizon
|
||||||
MAX_nforc2 = min(B,ceil(MaxNumberOfBytes/((endo_nbr)*(horizon+maxlag))/ ...
|
MAX_nforc2 = min(B,ceil(MaxNumberOfBytes/((endo_nbr)*(horizon+maxlag))/ ...
|
||||||
8));
|
8));
|
||||||
IdObs = bayestopt_.mfys;
|
IdObs = bayestopt_.mfys;
|
||||||
|
|
||||||
end
|
end
|
||||||
MAX_momentsno = min(B,ceil(MaxNumberOfBytes/(get_moments_size(options_)*8)));
|
MAX_momentsno = min(B,ceil(MaxNumberOfBytes/(get_moments_size(options_)*8)));
|
||||||
|
|
||||||
|
@ -232,7 +232,7 @@ else
|
||||||
'options_', options_, ...
|
'options_', options_, ...
|
||||||
'bayestopt_', bayestopt_, ...
|
'bayestopt_', bayestopt_, ...
|
||||||
'estim_params_', estim_params_, ...
|
'estim_params_', estim_params_, ...
|
||||||
'oo_', oo_);
|
'oo_', oo_);
|
||||||
% which files have to be copied to run remotely
|
% which files have to be copied to run remotely
|
||||||
NamFileInput(1,:) = {'',[M_.fname '_static.m']};
|
NamFileInput(1,:) = {'',[M_.fname '_static.m']};
|
||||||
NamFileInput(2,:) = {'',[M_.fname '_dynamic.m']};
|
NamFileInput(2,:) = {'',[M_.fname '_dynamic.m']};
|
||||||
|
@ -240,11 +240,10 @@ else
|
||||||
NamFileInput(length(NamFileInput)+1,:)={'',[M_.fname '_steadystate.m']};
|
NamFileInput(length(NamFileInput)+1,:)={'',[M_.fname '_steadystate.m']};
|
||||||
end
|
end
|
||||||
[fout] = masterParallel(options_.parallel, 1, B,NamFileInput,'prior_posterior_statistics_core', localVars,globalVars, options_.parallel_info);
|
[fout] = masterParallel(options_.parallel, 1, B,NamFileInput,'prior_posterior_statistics_core', localVars,globalVars, options_.parallel_info);
|
||||||
|
|
||||||
end
|
end
|
||||||
ifil = fout(end).ifil;
|
ifil = fout(end).ifil;
|
||||||
|
|
||||||
% ??????????
|
|
||||||
stock_gend=gend;
|
stock_gend=gend;
|
||||||
stock_data=Y;
|
stock_data=Y;
|
||||||
save([DirectoryName '/' M_.fname '_data.mat'],'stock_gend','stock_data');
|
save([DirectoryName '/' M_.fname '_data.mat'],'stock_gend','stock_data');
|
||||||
|
@ -301,4 +300,4 @@ if ~isnumeric(options_.parallel),
|
||||||
if leaveSlaveOpen == 0,
|
if leaveSlaveOpen == 0,
|
||||||
closeSlave(options_.parallel,options_.parallel_info.RemoteTmpFolder),
|
closeSlave(options_.parallel,options_.parallel_info.RemoteTmpFolder),
|
||||||
end
|
end
|
||||||
end
|
end
|
|
@ -133,14 +133,14 @@ end
|
||||||
if run_smoother
|
if run_smoother
|
||||||
stock_smooth=NaN(endo_nbr,gend,MAX_nsmoo);
|
stock_smooth=NaN(endo_nbr,gend,MAX_nsmoo);
|
||||||
stock_update=NaN(endo_nbr,gend,MAX_nsmoo);
|
stock_update=NaN(endo_nbr,gend,MAX_nsmoo);
|
||||||
stock_innov=NaN(M_.exo_nbr,gend,MAX_ninno);
|
stock_innov=NaN(M_.exo_nbr,gend,MAX_ninno);
|
||||||
if horizon
|
if horizon
|
||||||
stock_forcst_mean= NaN(endo_nbr,horizon+maxlag,MAX_nforc1);
|
stock_forcst_mean= NaN(endo_nbr,horizon+maxlag,MAX_nforc1);
|
||||||
stock_forcst_point = NaN(endo_nbr,horizon+maxlag,MAX_nforc2);
|
stock_forcst_point = NaN(endo_nbr,horizon+maxlag,MAX_nforc2);
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if nvn
|
if nvn
|
||||||
stock_error = NaN(size(varobs,1),gend,MAX_nerro);
|
stock_error = NaN(length(varobs),gend,MAX_nerro);
|
||||||
end
|
end
|
||||||
if naK
|
if naK
|
||||||
stock_filter_step_ahead =NaN(length(options_.filter_step_ahead),endo_nbr,gend+max(options_.filter_step_ahead),MAX_naK);
|
stock_filter_step_ahead =NaN(length(options_.filter_step_ahead),endo_nbr,gend+max(options_.filter_step_ahead),MAX_naK);
|
||||||
|
@ -150,10 +150,6 @@ stock_logpo = NaN(MAX_nruns,1);
|
||||||
stock_ys = NaN(MAX_nruns,endo_nbr);
|
stock_ys = NaN(MAX_nruns,endo_nbr);
|
||||||
|
|
||||||
for b=fpar:B
|
for b=fpar:B
|
||||||
|
|
||||||
% [deep, logpo] = GetOneDraw(type);
|
|
||||||
% set_all_parameters(deep);
|
|
||||||
% dr = resol(oo_.steady_state,0);
|
|
||||||
if strcmpi(type,'prior')
|
if strcmpi(type,'prior')
|
||||||
|
|
||||||
[deep, logpo] = GetOneDraw(type);
|
[deep, logpo] = GetOneDraw(type);
|
||||||
|
@ -304,22 +300,7 @@ for b=fpar:B
|
||||||
end
|
end
|
||||||
irun(7) = 1;
|
irun(7) = 1;
|
||||||
end
|
end
|
||||||
|
|
||||||
% if moments_varendo && (irun(8) > MAX_momentsno || b == B)
|
|
||||||
% stock = stock_moments(1:irun(8)-1);
|
|
||||||
% ifil(8) = ifil(8) + 1;
|
|
||||||
% save([DirectoryName '/' M_.fname '_moments' int2str(ifil(8)) '.mat'],'stock');
|
|
||||||
% if RemoteFlag==1,
|
|
||||||
% OutputFileName_moments = [OutputFileName_moments; {[DirectoryName filesep], [M_.fname '_moments' int2str(ifil(8)) '.mat']}];
|
|
||||||
% end
|
|
||||||
% irun(8) = 1;
|
|
||||||
% end
|
|
||||||
|
|
||||||
% DirectoryName=TempPath;
|
|
||||||
|
|
||||||
|
|
||||||
dyn_waitbar((b-fpar+1)/(B-fpar+1),h);
|
dyn_waitbar((b-fpar+1)/(B-fpar+1),h);
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
myoutput.ifil=ifil;
|
myoutput.ifil=ifil;
|
||||||
|
@ -332,7 +313,6 @@ if RemoteFlag==1,
|
||||||
OutputFileName_param;
|
OutputFileName_param;
|
||||||
OutputFileName_forc_mean;
|
OutputFileName_forc_mean;
|
||||||
OutputFileName_forc_point];
|
OutputFileName_forc_point];
|
||||||
% OutputFileName_moments];
|
|
||||||
end
|
end
|
||||||
|
|
||||||
dyn_waitbar_close(h);
|
dyn_waitbar_close(h);
|
||||||
|
|
Loading…
Reference in New Issue