Page 1 of 1

Error message showing up randomly?

PostPosted: Sat Jun 23, 2012 7:06 am
by Niklas
Hello,

I was on a Dynare course for students yesterday and we all had the same versions of Dynare and Matlab. However, when running a modfile (with the stochsimul command) most of the students got the following error message:

{Warning: usage: [bnds,rowd,sens,rowp,rowg] = mu(matin,blk,opt)}
{> In <a href="matlab: opentoline('C:\Program Files\MATLAB\R2012a\toolbox\robust\rctobsolete\mutools\commands\mu.m',45,1)">mu at 45</a>
In <a href="matlab: opentoline('C:\Data\day3\fun_NK_SOE_Course_UIP.m',39,1)">fun_NK_SOE_Course_UIP at 39</a>
In <a href="matlab: opentoline('C:\Program Files\MATLAB\R2012a\toolbox\optim\optim\fsolve.m',241,1)">fsolve at 241</a>
In <a href="matlab: opentoline('C:\Data\day3\NK_SOE_Course_UIP_steadystate.m',20,1)">NK_SOE_Course_UIP_steadystate at 20</a>
In <a href="matlab: opentoline('C:\dynare\4.2.2\matlab\steady_.m',50,1)">steady_ at 50</a>
In <a href="matlab: opentoline('C:\dynare\4.2.2\matlab\steady.m',54,1)">steady at 54</a>
In <a href="matlab: opentoline('C:\Data\day3\NK_SOE_Course_UIP.m',454,1)">NK_SOE_Course_UIP at 454</a>
In <a href="matlab: opentoline('C:\dynare\4.2.2\matlab\dynare.m',120,1)">dynare at 120</a>}
{Output argument "bnds" (and maybe others) not assigned during call to "C:\Program
Files\MATLAB\R2012a\toolbox\robust\rctobsolete\mutools\commands\mu.m>mu".

Error in <a href="matlab:helpUtils.errorDocCallback('fun_NK_SOE_Course_UIP', 'C:\Data\day3\fun_NK_SOE_Course_UIP.m', 39)" style="font-weight:bold">fun_NK_SOE_Course_UIP</a> (<a href="matlab: opentoline('C:\Data\day3\fun_NK_SOE_Course_UIP.m',39,0)">line 39</a>)
RERhC = (w+(1-w)*Tauh^(mu-1))^(1/(1-mu))/(1-wh+wh*Tauh^(muh-1))^(1/(1-muh));

Error in <a href="matlab:helpUtils.errorDocCallback('fsolve', 'C:\Program Files\MATLAB\R2012a\toolbox\optim\optim\fsolve.m', 241)" style="font-weight:bold">fsolve</a> (<a href="matlab: opentoline('C:\Program Files\MATLAB\R2012a\toolbox\optim\optim\fsolve.m',241,0)">line 241</a>)
fuser = feval(funfcn{3},x,varargin{:});

Error in <a href="matlab:helpUtils.errorDocCallback('NK_SOE_Course_UIP_steadystate', 'C:\Data\day3\NK_SOE_Course_UIP_steadystate.m', 20)" style="font-weight:bold">NK_SOE_Course_UIP_steadystate</a> (<a href="matlab: opentoline('C:\Data\day3\NK_SOE_Course_UIP_steadystate.m',20,0)">line 20</a>)
[x,fval]=fsolve(@fun_NK_SOE_Course_UIP,x0,optimset('Display','off'));

Error in <a href="matlab:helpUtils.errorDocCallback('steady_', 'C:\dynare\4.2.2\matlab\steady_.m', 50)" style="font-weight:bold">steady_</a> (<a href="matlab: opentoline('C:\dynare\4.2.2\matlab\steady_.m',50,0)">line 50</a>)
[ys,check] = feval([M_.fname '_steadystate'],...

Error in <a href="matlab:helpUtils.errorDocCallback('steady', 'C:\dynare\4.2.2\matlab\steady.m', 54)" style="font-weight:bold">steady</a> (<a href="matlab: opentoline('C:\dynare\4.2.2\matlab\steady.m',54,0)">line 54</a>)
steady_;

Error in <a href="matlab:helpUtils.errorDocCallback('NK_SOE_Course_UIP', 'C:\Data\day3\NK_SOE_Course_UIP.m', 454)" style="font-weight:bold">NK_SOE_Course_UIP</a> (<a href="matlab: opentoline('C:\Data\day3\NK_SOE_Course_UIP.m',454,0)">line 454</a>)
steady;

Error in <a href="matlab:helpUtils.errorDocCallback('dynare', 'C:\dynare\4.2.2\matlab\dynare.m', 120)" style="font-weight:bold">dynare</a> (<a href="matlab: opentoline('C:\dynare\4.2.2\matlab\dynare.m',120,0)">line 120</a>)
evalin('base',fname) ;

Caused by:
Failure in initial user-supplied objective function evaluation. FSOLVE cannot continue.
}


What was surprising is that for some students Dynare finished succesfully. It seems that there is something wrong with the external steady state file. But also this file was the same for all students.
Does anyone has an explanation why the error message showed up for some but not for all students?

Any help would be highly appreciated!
Best,
Niklas

Re: Error message showing up randomly?

PostPosted: Sat Jun 30, 2012 1:12 pm
by jpfeifer
It seems to be an issue with the path and the toolboxes. I guess "mu" in
Code: Select all
RERhC = (w+(1-w)*Tauh^(mu-1))^(1/(1-mu))/(1-wh+wh*Tauh^(muh-1))^(1/(1-muh));

should be a parameter, but instead the file tries to call the file mu.m of the robust controll toolbox. Changing the name of the parameter to something unique should help.

Re: Error message showing up randomly?

PostPosted: Tue Jul 10, 2012 3:42 pm
by Niklas
Thank you very much!