"Initial parameter values are outside parameter bounds"

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

"Initial parameter values are outside parameter bounds"

Postby JamieHall » Thu Jul 09, 2009 11:48 pm

Hi everyone,

Just a small suggestion for improving the error message "Initial parameter values are outside parameter bounds".

Currently, Dynare 4.0.4 prints numbers corresponding to the parameters that are being initialised outside their prior bounds. I've found it a bit more useful to delete lines 108 and 109 of dynare\4.0.4\matlab\dynare_estimation_1.m, and replace them with these lines:
Code: Select all
   too_low = find(xparam1 < bounds(:,1));
   too_high = find(xparam1 > bounds(:,2));
   ipp = estim_params_.nvx+estim_params_.nvn+estim_params_.ncx+estim_params_.ncn+1;
   for j = 1:length(too_low)
      ip = too_low(j);
      if(ip >= ipp)
         fprintf('%s is %f, but should be above %f\n', bayestopt_.name{ip}, xparam1(ip), bounds(ip,1));
      else
         fprintf('%s is %f, but should be above %f\n', deblank(M_.exo_names(estim_params_.var_exo(ip,1),:)),...
                         xparam1(ip), bounds(ip,1));
      end
   end
   for j = 1:length(too_high)
      ip = too_high(j);
      if(ip >= ipp)
         fprintf('%s is %f, but should be below %f\n', bayestopt_.name{ip}, xparam1(ip), bounds(ip,2));
      else
         fprintf('%s is %f, but should be below %f\n', deblank(M_.exo_names(estim_params_.var_exo(ip,1),:)),...
                         xparam1(ip), bounds(ip,2));
      end
   end
   fprintf('\n\n');



Hope that's helpful....

Jamie
JamieHall
 
Posts: 20
Joined: Wed Feb 11, 2009 4:42 am

Re: "Initial parameter values are outside parameter bounds"

Postby coot » Tue Jun 08, 2010 10:32 am

it works for dynare 4.1.1 also. thank you
coot
 
Posts: 24
Joined: Tue Apr 20, 2010 10:54 am


Return to Dynare contributions and examples

Who is online

Users browsing this forum: No registered users and 2 guests