Statalist


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

st: RE: help! Strange error in Stata


From   "Steichen, Thomas J." <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: help! Strange error in Stata
Date   Wed, 2 Jul 2008 12:59:44 -0400

Yes, the "right quote" is bogus, even though you are hitting the correct key.

A likely explanation is you are using an editor that has the feature called "smart quotes".
"Smart quotes" converts typewriter ' and " to the typeset versions, ' and ".

Solution: turn it off or use a different editor.

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

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Kyle K. Hood
Sent: Wednesday, July 02, 2008 12:43 PM
To: [email protected]
Subject: st: help! Strange error in Stata

This code (within a do-file)

. sum year
. local minyear = r(min)
. local maxyear = r(max)
. local yrdiff = `maxyear' - `minyear' // T-1

Generates the following result (and error):

Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
year | 2244 1979.5 12.70126 1958 2001
`maxyear' invalid name
r(198);

When I type the same code on the command line, I don't get the error --
however, when I erase and retype the code within the do-file, I get the
same error. I am running Stata/SE 9. I really have no idea what is going
on. I have scrutinized for spelling, etc. The code that I sent was
copied out of the do-file directly. I do wonder about the right single
quote (it looks funny), but I am using Stata's do-file editor, and am
using the single-quote-key directly to the left of the "enter" key. Can
anyone help?


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