% More estimated parameters than parameters in the mode_file.
skipline()
disp(['The ''mode_file'' 'options_.mode_file' has been generated using another specification of the model or another model!'])
disp(['Your file contains estimates for 'int2str(length(mode_file.xparam1))' parameters, while you are attempting to estimate 'int2str(number_of_estimated_parameters)' parameters:'])
disp(['--> Estimated parameter 'bayestopt_.name{i}' is not present in the loaded ''mode_file'' (prior mean or initialized values will be used, if possible).'])
disp(['--> Parameter 'mode_file.parameter_names{i}' is not estimated according to the current mod file.'])
end
end
if~options_.mode_compute
% The mode is not estimated.
error('Please change the ''mode_file'' option, the list of estimated parameters or set ''mode_compute''>0.')
else
% The mode is estimated, the Hessian evaluated at the mode is not needed so we set values for the parameters missing in the mode file using the prior mean or initialized values.
% Less estimated parameters than parameters in the mode_file.
skipline()
disp(['The ''mode_file'' 'options_.mode_file' has been generated using another specification of the model or another model!'])
disp(['Your file contains estimates for 'int2str(length(mode_file.xparam1))' parameters, while you are attempting to estimate only 'int2str(number_of_estimated_parameters)' parameters:'])
disp(['--> Estimated parameter 'deblank(bayestopt_.name(i,:))' is not present in the loaded ''mode_file'' (prior mean or initialized values will be used, if possible).'])
error('Please change the ''mode_file'' option, the list of estimated parameters or set ''mode_compute''>0.')
end
else
% The mode is estimated, the Hessian evaluated at the mode is not needed so we set values for the parameters missing in the mode_file using the prior mean or initialized values.
if~isempty(xd)
xparam1(xd)=mode_file.xparam1(md);
else
% None of the estimated parameters are present in the mode_file.
error('Please remove the ''mode_file'' option.')
end
end
else
% The number of declared estimated parameters match the number of parameters in the mode file.
% Check that the parameters in the mode file and according to the current mod file are identical.
if~isfield(mode_file,'parameter_names')
disp(['The ''mode_file'' 'options_.mode_file' has been generated using an older version of Dynare. It cannot be verified if it matches the present model. Proceed at your own risk.'])
error('Please change the ''mode_file'' option, the list of estimated parameters or set ''mode_compute''>0.')
end
else
% The mode is estimated, the Hessian evaluated at the mode is not needed so we set values for the parameters missing in the mode_file using the prior mean or initialized values.
if~isempty(xd)
xparam1(xd)=mode_file.xparam1(md);
ifisfield(mode_file,'hh')
hh(xd,xd)=mode_file.hh(md,md);
end
else
% None of the estimated parameters are present in the mode_file.