[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: Create an ado file which contains multiple mata functions

From   Glenn Goldsmith <>
Subject   RE: st: Create an ado file which contains multiple mata functions
Date   Thu, 25 Jun 2009 22:48:54 +0100


-help m1_ado- should answer your first question (you might
particularly want to look at the section on "Where to store the Mata
functions"). AFAICT the order in which the mata functions appear in an
.ado file does not matter (unless you're using structures, in which
case they need to be defined before they can be used). should answer your
second question.



Nathan Danneman <> wrote:

Hi all,

I am trying to write an .ado file that will set up a few components in
stata, then use those components in mata.  Interestingly, there are
several mata functions which need to be defined for the highest-level
function to work.  I would like to eventually share this ado file with
the stata community.  That said, I have the following questions:

1) Where/how should the mata function (and sub-functions) appear in
the ado file (especially with regards to making the program execute
quickly, given that the mata functions which need to be defined
contain around 60 lines of code).

   Would this be correct...

program trial...
   stata commands...
   mata: highest level function
   more stata commands to display resutls

program mata highest level function...

progrm mata function called by highest level function...


2) Once written (and extensively tested), how does one go about making
an ado file public?

Thanks so much,
*   For searches and help try:

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