I was recently not understanding why some error messages were being generated by mata's optimize(). I found that it was quite easy to modify the routines to include some debugging print-outs. Broadly we want to create modified routines that mask the existing ones. Here's the basic steps:
Enjoy your modified version. When you're all done you can use -mata mlib index- again to get the default ordering.
- Find the mata file (in my case deriv.mata) in the Stata folder, copied it to your own directory, and make changes.
- Turn it into a personal library. See the basic template at -help mata_mlib-.
- Have the personal library called instead of the builtin routines. The -mata mlib index- command from the previous step outputted the order in which the libraries are searched for a function.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*Make sure -mata: mata mlib index- has been executed previously | |
cap di regexm("`c(matalibs)'", "(.*);lpersonal(.*)") | |
mata: mata set matalibs "lpersonal;`=regexs(1)'`=regexs(2)'" |
No comments:
Post a Comment