Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: no display


From   Nick Cox <n.j.cox@durham.ac.uk>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   st: RE: no display
Date   Wed, 14 Mar 2012 15:58:53 +0000

Should be "ATNT" throughout. Same principles. 

Nick 
n.j.cox@durham.ac.uk 


-----Original Message-----
From: Nick Cox 
Sent: 14 March 2012 15:58
To: 'statalist@hsphsun2.harvard.edu'
Subject: RE: no display

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 
n.j.cox@durham.ac.uk 


-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Abhimanyu Arora
Sent: 14 March 2012 15:36
To: statalist@hsphsun2.harvard.edu
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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index