Statalist


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

st: How to identify different versions of the a program within other program


From   tiago.pereira@incor.usp.br
To   statalist@hsphsun2.harvard.edu
Subject   st: How to identify different versions of the a program within other program
Date   Fri, 21 Mar 2008 11:02:45 -0300 (BRT)

Dear All,

I am writing a program that calls another program to perfom part of its
calculations. However, the program I want to call has two versions, say,
version 1 and version 2, respectively. In this specific case, I am working
with -metareg-, but have more examples with the same issue.

The problem is that the former version outputs the result I am looking for
in a global $S_2, whereas the latter outputs the same result as e(tau2).

Is there a way to identify the version of -metareg- that the user is using
so that  I can write a simple loop such as:

if "`version 1'" {

local myresult= $S_2
}
else {
local myresult = e(tau2)
}

Thank you very much for your time and tips!

All the best,

Tiago






*
*   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/



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