Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: error message about Mata memory

From   Kit Baum <>
Subject   st: error message about Mata memory
Date   Mon, 23 Oct 2006 17:25:52 -0400

Nick said

If I understand this correctly, you need to find out
about -set trace-.

. set trace on

sets tracing of commands so that you can see where
in the code a command failed. Tracing can be tuned
in various ways.

I don't know anything about SAS, but if your ideal
is equivalent to

error 198;
at line ... of -foobar-
-foobar- was called from line ... of -whizzbang-
-whizzbang- was called from line ... of -bushranger-

well, that's another style, and ultimately equivalent
to Stata's style.

Not quite. If in an ado-file you give the command

mata: myfunc("arguments")

and some error arises in myfunc, you just get an abort. You are not told where within myfunc (or where within whatever Mata function myfunc might call) the error occurs in any useful way. The example that provoked this thread included a stack trace through several Mata functions, but the information about where in the ultimate module (xtm_mixed_ll_uu()) the abend occurs is, regrettably, not available.

Kit Baum, Boston College Economics
An Introduction to Modern Econometrics Using Stata:

* For searches and help try:

© Copyright 1996–2021 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index