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