I don't think so. But you needn't check that way.
Your branch might as well be
if "$S_2" != "" local myresult $S_2
else local myresult = e(tau2)
Nick
[email protected]
[email protected]
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)
}
*
* 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/