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: problem 0 likelihood ml


From   [email protected] (Jeff Pitblado, StataCorp LP)
To   [email protected]
Subject   Re: st: problem 0 likelihood ml
Date   Fri, 16 Nov 2012 11:36:27 -0600

Olivier Francois <[email protected]> is using -ml check- while specifying
more than one technique:

> The probit now works, but I still have the problem if I list more than one technique. 
> 
> The code has become the following:
> 
> //creating the data
> clear
> set more off
> set seed 12345
> set obs 1000
> matrix C = I(4)
> drawnorm z v e x, corr(C)
> replace z = sqrt(2)*z
> scalar a0 = 2
> scalar a1 = -1
> gen D = (a0 + a1*z > v)
> gen Y = 0.5 - 0.5*x + e
> 
> //Probit model
> capture program drop myprobit
> program myprobit
>     version 11.2
>     args lnf xgam
> 
>     quietly {
>         replace `lnf' = ln(normal(-`xgam')) if $ML_y1 == 0
>         replace `lnf' = ln(normal(`xgam')) if $ML_y1 == 1
>     }
> end
> 
> ml model lf myprobit (xgam: D = z), vce(robust) technique(nr bhhh)
> ml check
> 
> /*It works fine with just one technique (any), but come back with the following error if I combine more than one technique:
>        opt__eval_cycle():  3301  subscript invalid
>             opt__eval():     -  function returned error
>     _optimize_evaluate():     -  function returned error
>        _mopt__evaluate():     -  function returned error
>      mopt__check_test1():     -  function returned error
>       _moptimize_check():     -  function returned error
>             Mopt_check():     -  function returned error
>                  <istmt>:     -  function returned error
> */

-ml check- should only be used with -technique(nr)- and should have given
Olivier an error message to that effect.

We will look into fixing -ml check- to report an error if anything other than
-technique(nr)- is specified to -ml model-.

--Jeff
[email protected]
*
*   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