Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Problem with tempvar __000000

From   "Renzo Comolli" <>
To   <>
Subject   st: Problem with tempvar __000000
Date   Mon, 21 Jun 2004 00:41:10 -0400

A variable created by -tempvar- is hanging around inside the saved dataset.
Its name is __000000
Is that normal behavior? I had never noticed this behavior before, but maybe
I am just confused.

See the (reproducible) code below, taken from my results window.
The case presented here is benign, but soemtimes malign cases occur:
A. the code gives an error message and still performs the operation, as in
the exaple of -twoway- here below
B. I believe that at least in one case, it actually broke the code. It was
in a -reshape long-. (I can't be sure though, because I was tearing a huge
file apart to figure out where the problem was coming from).

If, after the code below, you actually issue once again
. use debugauto, clear
then variable __000000 appears in the variable window.

Any clarification? Is it a bug? I am missing something?

Best Regards,
Renzo Comolli

Here is the code to reproduce (most) of the behavior described.

. about
Intercooled Stata 8.2 for Windows
Born 18 May 2004

. sysuse auto, clear
(1978 Automobile Data)

. tempvar num_miss

. gen `num_miss'=0

. save debugauto, replace
file debugauto.dta saved

. use debugauto, clear
(1978 Automobile Data)

. describe __000000

              storage  display     value
variable name   type   format      label      variable label
__000000        float  %9.0g                  

. tab __000000, mi

   __000000 |      Freq.     Percent        Cum.
          0 |         74      100.00      100.00
      Total |         74      100.00

. twoway (lfit  price  mpg) (scatter  price mpg), by( foreign)
__000000 already defined

* but the graph still appears correctly

*   For searches and help try:

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