Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • moptimize 'lf1' evaluator passed todo 2

    Hi,

    I am implementing some MLE using moptimize, but cannot get the "lf1" evaluator method to work ("d0" and "d1" work for this problem, but I need to use SVY).

    When debugging I noticed that there are numerous calls with todo=2 towards the end of the evaluation, before it stops and returns some nonsensical parameter estimates.
    According to the documentation, todo = 0 or 1 for "lf1", so I do not understand what is going on. This happens both in Stata 12.1 and 13.

    Thanks for any hints.
    Richard

    ...
    moptimize_init_evaluator(M, &TransMLE_lfx())
    moptimize_init_evaluatortype(M, "lf1")


    function TransMLE_lfx(transmorphic M, real scalar todo, real rowvector lnf, s, H) {
    // here todo evaluates to 2 the last few calls during execution
    }

  • #2
    Richard found a bug in moptimize(). A fix for this will be available in a future
    update to Stata 13 (and Stata 14).

    While moptimize() should have passed in 1 for todo in these
    cases, it is difficult to explain why this would causea problem in Richard's evaluator
    without seeing the code in TransMLE_lfx().

    Comment


    • #3
      Hej Jeff,

      thanks for the reply. The code in my MLE evaluator ist quite involved, that's why I did not post it. If there is any other debugging information I can provide, let me know.
      I attached the value of todo by call to TransMLE_lfx, in case that is of any use.
      Attached Files

      Comment

      Working...
      X