Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: CMP Error Message


From   John Luke Gallup <[email protected]>
To   [email protected]
Subject   Re: st: CMP Error Message
Date   Sat, 23 Mar 2013 12:34:15 -0700

Jeffrey,

This is pretty clearly a bug in -cmp-, where the Mata function cmp_lnL() is probably calling the function l(), which cannot handle the value of its argument.  This is not likely to be a problem you can fix, unless you are not using -cmp- correctly.  In any case, a program like -cmp- should ideally trap user errors rather than crashing.

It is a little mysterious why -cmp- produced this error message when it apparently didn't during an identical previous run, but almost certainly something changed from one run to the next.

I think your best bet is to contact the author of -cmp-, David Roodman (see the end of the -cmp- help file for his email address), and politely ask for help.

John

On Mar 23, 2013, at 8:32 AM, Jeffrey Ferris <[email protected]> wrote:

> Hello,
> 
> I am working with the user generated command CMP and I am having a
> strange problem that I am unable to diagnose. I am trying to estimate
> a system of equations with one probit equation and two mprobit
> equations (with no overlap between the multinomial models). Every time
> I try to run the model it proceeds normally until it tries to collect
> Halton draws and gives me the following error message:
> 
> "I():  3300  argument out of range
>               cmp_lnL():     -  function returned error
>                 <istmt>:     -  function returned error
> Mata run-time error"
> 
> The strange thing is that I ran the exact same code Thursday night and
> it worked without problem. I have gone through every line of my code
> and cannot see what could be causing this failure. I also double
> checked that cmp is working correctly by running it with some older
> models without failure. Does anybody have any idea what could be going
> on or, more importantly, how I can rectify this problem? For those
> interested, here are the commands I used to generate this output:
> 
> gen ind1=cond(treat_t==0,$cmp_mprobit,$cmp_out)
> gen ind2=cond(treat_t==1,$cmp_mprobit,$cmp_out)
> local 2step_m DstCityBdr_avg DistRds_avg DistIntHwy lntotstream_dens ///
> lnsubdivarea existhouse MeanElev_avg MeanSlope_avg ///
> Area100yr_dens depwat_avg hydgrp_C hydgrp_D
> foreach class in RC4 RC2 {
> local zone_int_rc `zone_int_rc' zone_`class' c.treat_t#c.zone_`class'
> }
> cmp (y= `zone_int_rc' minor_exempt_RC treat_t `2step_m' `years`i'') ///
> (zone_class= `2step_m' DistRiver_avg DistPStrm_avg DistIStrm_avg
> Watershed2-Watershed15, iia) ///
> (zone_class= `2step_m' DistRiver_avg DistPStrm_avg DistIStrm_avg
> Watershed2-Watershed15, iia) ///
> if `timeline`i'' & RCsum>0.5, difficult indicators($cmp_probit ind1 ind2) ///
> tech(dfp nr) cluster(ind) robust ghkdraws(10)
> outreg2 using cmp_rc`i'.csv, replace dec(3)
> 
> Thank You,
> 
> Jeff Ferris
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index