Announcement

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

  • Suppressing the output: “numerical derivatives...."

    The reviewer asked us to include an option for the user to suppress the output lines (such as “numerical derivatives are approximate; flat or discontinuous region encountered”, “could not calculate numerical derivatives -- flat or discontinuous region encountered; no convergence”). See image 1.jpg.

    These output lines are generated by a MATA function _optimize(S) if it encounters a flat or discontinuous region. We employ _optimize(S) in the fashion as portrayed in image 2.jpg. The reason to use _optimize(S) instead of optimize(S) is to not abort if such situations occur. We have tried running these commands using stata("capture mata ...") but this didn't work. We're stuck on how to solve this, as using capture for the whole program would also suppress the output matrix.

    We're quite stuck here, hopefully someone has the solution to this.
    Attached Files

  • #2
    In the output of help mf_optimize we see optimize_init_tracelevel() and several beginning optimize_init_trace_ - perhaps those, or perhaps set iterlog, provide a way to suppress the unwanted output.

    Comment

    Working...
    X