Statalist


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

st: Functions in Stata


From   "Sergiy Radyakin" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: Functions in Stata
Date   Fri, 8 Aug 2008 12:42:51 -0400

Dear All

there was a question asked earlier on Fri, 19 Dec 2003 regarding
defining functions in Stata, but essentially no answer was given (or
none that I could find). Nick Cox pointed to the manual (I don't know
which edition, but "saving results" is now 18.10 of [U]). This part of
the manual does not describe the functions though.

Here are some observations:

Observation 1: some Stata commands return functions, e.g. -regress-
returns e(sample)

Observation 2: it is possible to get a list of defined functions by
reading extended macro function:

  sysuse auto
  regress p w
  display `"`:e(functions)'"'

Observation 3: none of the official .ado files eshibits this feature

Observation 4: none of the user commands that I've seen uses this feature.

If there is any new information available now, that was not available
in 2003 I would be glad to hear that.

Why do I need to know this? I am writing a command that automatically
processes the results saved in r() e() s() and at the very least I
need to know whether any user-defined command could, can or will be
able to save anything in the "functions" section.

Thank you,
    Sergiy Radyakin
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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