Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: RE: no display
From
Nick Cox <[email protected]>
To
"'[email protected]'" <[email protected]>
Subject
st: RE: no display
Date
Wed, 14 Mar 2012 15:57:34 +0000
Yes indeed. Scalars and variables share the same namespace. When you ask for
. di AINT
Stata interprets that as a reference to youre variable -AINT_num- and -display-s it to the best of its ability; in practice it will show -AINT_num[1]-.
You can solve this by one or more of
1. Disallowing variable name abbreviations. -set varabbrev off- if I recall correctly.
2. Using scalar names that are quite distinct from variable names.
3. Using -scalar(AINT)- to flag that you want the scalar.
This is all documented, but for a helpful reprise start with
SJ-6-2 dm0021 . Stata tip 31: Scalar or variable? Problem of ambiguous names
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . G. I. Kolev
Q2/06 SJ 6(2):279--280 (no commands)
tips for avoiding abbreviation conflicts with variables
when naming scalars
which is accessible, online.
. search author, kolev
gives a clickable link.
Nick
[email protected]
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Abhimanyu Arora
Sent: 14 March 2012 15:36
To: [email protected]
Subject: st: no display
Dear statalist
The following link could show the strange problem I am facing
I follow same procedure twice but in one case stata displays the
scalar (ATNT) while for the other case does not.
http://screencast.com/t/oq6sdsL0
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/