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 on April 23, and its replacement, is already up and running.

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

st: RE: no display

From   Nick Cox <>
To   "''" <>
Subject   st: RE: no display
Date   Wed, 14 Mar 2012 15:58:53 +0000

Should be "ATNT" throughout. Same principles. 


-----Original Message-----
From: Nick Cox 
Sent: 14 March 2012 15:58
To: ''
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. 


-----Original Message-----
From: [] On Behalf Of Abhimanyu Arora
Sent: 14 March 2012 15:36
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.

*   For searches and help try:

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