Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: ml option "noclear" does not work with ml method "d0". Why?


From   jpitblado@stata.com (Jeff Pitblado, StataCorp LP)
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: ml option "noclear" does not work with ml method "d0". Why?
Date   Wed, 08 Sep 2010 09:36:03 -0500

Daniel <Daniel.Koch@econhist.vwl.uni-muenchen.de> is using the -noclear-
option with -ml max- and is getting a 'type mismatch' error with a -d0-
evaluator:

> I do not understand why:
> 
> ml model lf test_ll (`lhs' = `rhs')
> ml max, noclear
> ml max
> 
> works fine, while the same doesn't with method d0?
> STATA then reports: "type mismatch ml model not found".
> 
> In the end I want to have an estimator which penalizes the loglikelihood
> after each iteration with a certain roughness-penalty. I've tried the
> following:
> 
> ml model d0 test_ll (`lhs' = `rhs')
> ml max, nooutput noclear iterate(1)
> while e(converged)!=1 {
>                         ....
> 			global penalty  = $lambda*`penalty'
> 			ml model d0 test_ll (`lhs' = `rhs')
> 			ml max, search(off) nooutput noclear
>                         ....
>           	      }
> But STATA complains with the mentioned message.
> Any idea how I could solve this? I am thankful for every comment.

Daniel has found a bug in -ml- when the -noclear- option is specified.  The
copy of the -e(sample)- variable is not being properly generated as a -byte-
variable.  We will have this fixed by the next ado-file update.

In the mean time, Daniel can retype the the -$ML_samp- variable to -byte-
prior to calling -mleval- by adding the following line to the -test_ll-
program:

	recast byte $ML_samp

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


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index