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

Re: st: RE: ghost value label problem


From   David Kantor <[email protected]>
To   [email protected]
Subject   Re: st: RE: ghost value label problem
Date   Wed, 29 Oct 2003 13:51:50 -0500

At 06:11 PM 10/29/2003 +0000, Nick Cox wrote:
This rang a bell. A while back the problem was described in very
similar
terms:

========================
Suppose you define value labels, attach them to variables, and then
later change your mind about attaching labels.

Even if you -drop- the value labels, according to Stata, for example
the
-describe- or -codebook- commands, the variables continue to have
labels
attached: it is just that those labels do not exist.
[...]
Conversely, you can attach a label that doesn't exist.

label val myvar xyz
doesn't care whether xyz exists as a defined label.

Furthermore, you can do this, and then define label xyz afterwards; it will work just fine.

But this behavior can lead to trouble if you make a typo. If I code...
label val myvar xyx
where I meant xyz (and label xyz is defined -- either before or afterwards), Stata will not give me any warning.

-- David

David Kantor
Institute for Policy Studies
Johns Hopkins University
[email protected]
410-516-5404

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