Wednesday, December 28, 2005
st: -ml-based matrices
I have a likelihood that meets the method -lf- observation-by-observation form requirements, and I want to get access to the derivatives matrices, i.e., the components of the -robust- matrix estimator. Is that possible within -lf- framework, or do I need to re-write all of this in -d2-... which is feasible, but of course cumbersome as things always are with -d*- methods? In ml_max.ado code, I see matrices $ML_CT and $ML_V, but these rather seems to be the constrained VCE matrix. -ml_score- computes the variables for the scores, but I need -mlmatsum- results out of that, and that is a built-in command that I cannot hack. -ml_elf- deals with $ML_g and $ML_V matrices, and that seems to be the things I need, but I am not that sure. I couldn't properly find where the -robust- option is used -- $ML_vce is set in -ml_model-, but I could only find a reference to it in -ml_query-. -ml_max- makes a call to -_robust-, but again that's a built-in command; I sort of understand what it does, but again I cannot get into the guts of it. -ml_clear- deletes all of those matrices, so I would need to step in somewhere before that happens -- it looks like -ml_hold- is doing something like that; or I can probably -ereturn matrix- them -- but again I need the internal $ML_* names of the matrices to do that...
Is this described in the 3rd edition of [ML] at all?
Probably I can do what I want in about five to ten lines of code that uses a lot of undocumented -ml- engine tricks. If Stata Corp is unwilling to go into this technical stuff on the list, I can ask techsupport@ privately or whatever the proper way for that might be.
-- Stas Kolenikov http://stas.kolenikov.name
* * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/
Links to this post: