Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Displaying value labels within a" foreach" statement


From   "Siyam, Amani" <[email protected]>
To   <[email protected]>
Subject   st: Displaying value labels within a" foreach" statement
Date   Wed, 20 Jul 2005 09:40:23 +0200

Dear Stata-listers,

I have the following foreach statement:

foreach i in 8 11 14 17 20 {

	foreach j in x y z  {

		di "		Daily intake `j' at age `i'  months" 

		tabstat `j' if vnum==`i', by(site) stats(mean sd)
col(stats)
	}
}

There are value labels for the values 8 11 14 17 20 that "i" takes that
I wish to display. Is there a way I can do that.


Many thanks for your help in advance.


Amani


*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index