Resources

Error using MaxLik library

0

Hi I have been getting the following error while trying to estimate a model.

************************

C:\gauss13\src\maxutil.src(3100) : error G0047 : Rows don’t match
Currently active call: _max_grdfd [3100] C:\gauss13\src\maxutil.src
Stack trace:
_max_grdfd called from C:\gauss13\src\maxutil.src, line 2897
_max_rdd called from C:\gauss13\src\maxutil.src, line 2950
_max_deriv called from C:\gauss13\src\maxutil.src, line 1942
_max_sctu called from C:\gauss13\src\maxutil.src, line 882
_max called from C:\gauss13\src\maxlik.src, line 547
maxlik called from C:\Users\ane13003\Dropbox\ResearchCoursesOther_UCONN\Simulation\LatSegVN2Scaled.gss, line 241

*****************************

But the thing is the error is occurring after my problem complete several runs, for example the error was displayed after the maxlik function completed more than 2000 iterations.

I would appreciate if someone could help me identify the problem.

Thanks and Regards

Annesha

 

asked May 30, 2014

1 Answer

0

Most likely your likelihood function is returning an error code.  Add an ‘isinfnanmiss’ check of the return value like this:

proc (1) = myLikelihood(x, y);
   local my_return;
   .
   .
   .
   my_return = ...;
   if isnanmiss(my_return);
      my_return = my_return; //put a breakpoint on this line
   endif;
   retp(my_return);
endp;

Then run your code under the debugger with a breakpoint inside the ‘if’ statement.