suggestion for more information

As Dynare 4 is now the main version, this forum is now closed. Please, post
on the Dynare Help forum
Forum rules
As Dynare 4 is the current Dynare version, there forum is now close. Post new question in the Dynare Help Forum.

suggestion for more information

Postby lombard » Thu Nov 13, 2008 2:26 pm

Hi,

I see that in dynare_estimation you have the following piece of code
Code: Select all
 if any(xparam1 < bounds(:,1)) | any(xparam1 > bounds(:,2))
   find(xparam1 < bounds(:,1))
   find(xparam1 > bounds(:,2))
   error('Initial parameter values are outside parameter bounds')
    end


I would suggest to give more information to the user than just printing out numbers. Why don't you replace it with

Code: Select all
 if any(xparam1 < bounds(:,1)) | any(xparam1 > bounds(:,2))
                  xlb=find(xparam1 < bounds(:,1));
     xub=find(xparam1 > bounds(:,2));
 
        disp('parameters violating the lower bound')
        fprintf('number \t value \t lower bound\n')
        fprintf('%5.0f\t %5.5f \t %5.5f\n', xlb,xparam1(xlb),bounds(xlb,1))
        disp('parameters violating the upper bound')
        fprintf('number \t value \t upper bound\n')
        fprintf('%5.0f\t %5.5f \t %5.5f\n', xub,xparam1(xub),bounds(xub,2))

        error('Initial parameter values are outside parameter bounds')
 end


Best

Gianni
lombard
 
Posts: 132
Joined: Wed Feb 02, 2005 12:36 pm
Location: Basel

Return to Dynare version 4

Who is online

Users browsing this forum: No registered users and 2 guests