Statalist The Stata Listserver


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

Re: st: Several ttests


From   Philip Ryan <[email protected]>
To   [email protected]
Subject   Re: st: Several ttests
Date   Fri, 29 Dec 2006 10:35:37 +1030

Stata users must distinguish the common right sided single quote from the left sided single quote. Most programs - especially word processors - expect you to use the right sided quote at both the left and right ends of an expression, but, as far as local macros are concerned, Stata demands explicit left single quote to open, and right single quote to close, an expression. A quick glance around my office shows that on IBM, Microsoft and Dell branded keyboards, the left single quote shares the tilde "~" key on the upper left of the keyboard, just above the tab key. But keyboards are hardly standard these days (especially on laptops) so you might have to hunt around.

May I suggest that, at your earliest possible convenience, you read Chapter 18 of the User's Guide, wherein all manner of useful goodies are explained. The Chapter is entitled "Programming Stata" but I think anyone who wishes to venture beyond the simplest Stata constructs would need to be familiar with some of its contents, especially the first sections on macros. Use of different types of quotes and macro expansion are explained. Your path to learning Stata will be much smoother as you will then also be able to tackle some of the topics in the Programming Manual (such as foreach and forvalues) which are as valuable to non-programmers as they are to programmers.

HTH

Phil




At 06:29 PM 28/12/2006 -0500, you wrote:

It worked!

Thanks.

What's with the quote marks? like in :

di "`var'"

I see 3 types " ' and ` (this last one, I am not sure I have on my keyboard)

Thanks for your patience.

*
*   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/
Philip Ryan
Associate Professor,
Discipline of Public Health

Director, Data Management & Analysis Centre

Associate Dean (IT)
Faculty of Health Sciences

postal address:
Department of Public Health
Mail Drop 511
University of Adelaide 5005
South Australia

location:
Level 6
Bice Building
Royal Adelaide Hospital
North Terrace
Adelaide

tel 61 8 8303 3570
fax 61 8 8223 4075
http://www.public-health.adelaide.edu.au/
CRICOS Provider Number 00123M
-----------------------------------------------------------
This email message is intended only for the addressee(s)
and contains information that may be confidential and/or
copyright. If you are not the intended recipient please
notify the sender by reply email and immediately delete
this email. Use, disclosure or reproduction of this email
by anyone other than the intended recipient(s) is strictly
prohibited. No representation is made that this email or
any attachments are free of viruses. Virus scanning is
recommended and is the responsibility of the recipient.
*
*   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