Bookmark and Share

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

[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 (Jeff Pitblado, StataCorp LP)
Subject   Re: st: ml option "noclear" does not work with ml method "d0". Why?
Date   Wed, 08 Sep 2010 09:36:03 -0500

Daniel <> is using the -noclear-
option with -ml max- and is getting a 'type mismatch' error with a -d0-

> 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-

	recast byte $ML_samp

*   For searches and help try:

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