diff --git a/matlab/initial_estimation_checks.m b/matlab/initial_estimation_checks.m index 8e4c6cb92627a5778af85aba2a9d5101fdf43a03..8925d1fed1dd2c1a2ccb27b87740ea8ec0d3c9fb 100644 --- a/matlab/initial_estimation_checks.m +++ b/matlab/initial_estimation_checks.m @@ -81,10 +81,18 @@ function initial_estimation_checks(xparam1,gend,data) end end end - + if info(1) > 0 - disp('Error in computing likelihood for initial parameter values') - print_info(info) + disp('Error in computing likelihood for initial parameter values') + print_info(info) + end + + if any(abs(oo_.steady_state(bayestopt_.mfys))>1e-9) & (options_.prefilter==1) + disp(['You are trying to estimate a model with a non zero steady state for the observed endogenous'] + disp(['variables using demeaned data!']) + error('You should change something in your mod file...') end + + disp(['Initial value of the log posterior (or likelihood): ' num2str(-fval)]);