On Tue, Jan 19, 2010 at 1:22 PM, Quang Nguyen <[email protected]> wrote:
> When I run the following code:
>
> for i = 1/`var' {........
> }
>
> where var is a variable in the data set.
>
> The code doesn't work. Can you suggest a solution?
qui sum `var'
for i = 1/`r(N)'{
}
But I suspect this isn't really what you want and there is likely a
better/cleaner solution. If you could provide greater context such a
solution might be forthcoming.
Neil
--
"... no scientific worker has a fixed level of significance at which
from year to year, and in all circumstances, he rejects hypotheses; he
rather gives his mind to each particular case in the light of his
evidence and his ideas." - Sir Ronald A. Fisher (1956)
Email - [email protected]
Website - http://slack.ser.man.ac.uk/
Photos - http://www.flickr.com/photos/slackline/
*
* 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/