| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: Re: Display query
-di variable name- displays the first value of that variable.
If you want to display the variable name itself you can replace:
di `i'
with
di "`i'"
Hope this helps,
Maarten
-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands
visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434
+31 20 5986715
http://home.fsw.vu.nl/m.buis/
-----------------------------------------
-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of Paul Fenner
Sent: woensdag 10 januari 2007 16:57
To: [email protected]
Subject: st: Re: Display query
I am using the following simple do file
set more off
foreach i of varlist lr1-lr6 ll1-ll6 ur1-ur6 ul1-ul6 br ar pr{
di `i'
ttest `i',by(gender)
}
set more on
and I would like to display the variable represented by i in the varlist but
all I get is a number which is presumably the numerical representation of
the variable. I tried using tostring to generate a new variable from i but
it failed.
Thanks,
Paul
_________________________________________________________________
Find Love This New Year With match.com! msnuk.match.com
*
* 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/
*
* 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/