Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

st: RE: AW: return a global vriable in rclass‏

From   "Nick Cox" <>
To   <>
Subject   st: RE: AW: return a global vriable in rclass‏
Date   Thu, 22 Apr 2010 15:20:06 +0100

Like Martin, I don't find the question very clear, but 

1. If something is a global, you don't need to return it at all, as it is visible outside any program in any case. 

2. Nothing stops you going (e.g.) 

return scalar foo = $foo 


Martin Weiss

I am afraid you have to provide more details on your simulation. The
solution could be as easy as

qui count
ret sca simsize=r(N)

but everything depends on what you really want to achieve. 

BTW, how does -run- return "r(mean)"? Did you mean -sum-?

sun samn

I am trying to record the sample size in simulation; however, I define
it as a global variable in my rclass program. Does someone know how to
record it in the way like return it in rclass, like after 'run', we do
'return scalar smean=r(mean)' ?

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index