Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Re: Display query


From   "Steichen, Thomas J." <[email protected]>
To   <[email protected]>
Subject   st: RE: Re: Display query
Date   Wed, 10 Jan 2007 11:19:09 -0500

Add quotes:

set more off
foreach i of varlist lr1-lr6 ll1-ll6 ur1-ur6 ul1-ul6 br ar pr{
  di "`i'"
  ttest `i', by(gender)
}

-----------------------------------------
Thomas J. Steichen
[email protected]
-----------------------------------------



> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Paul Fenner
> Sent: Wednesday, January 10, 2007 10:57 AM
> 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/
> 

-----------------------------------------
CONFIDENTIALITY NOTE: This e-mail message, including any
attachment(s), contains information that may be confidential,
protected by the attorney-client or other legal privileges, and/or
proprietary non-public information. If you are not an intended
recipient of this message or an authorized assistant to an intended
recipient, please notify the sender by replying to this message and
then delete it from your system. Use, dissemination, distribution,
or reproduction of this message and/or any of its attachments (if
any) by unintended recipients is not authorized and may be
unlawful.


*
*   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