[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: RE: Stata doesn't complain about non-existent value label

From   "Austin Nichols" <>
Subject   Re: st: RE: Stata doesn't complain about non-existent value label
Date   Thu, 17 Jul 2008 11:12:16 -0400

Clyde Schechter--
Whenever you are testing equality, it is up to you to make sure that
both sides of the double equal sign make sense, e.g. have the same
precision (so you don't wind up with a false negative comparing 1 and
1+epsdouble for example).  In your case, you might want to check that
the RHS of the == is there, with e.g. -confirm- as illustrated in the
cut-and-paste example here:

conf n `="Alive":live_statusw'
la def live_statusw 1 "Alive"
conf n `="Alive":live_statusw'

On 7/17/08, Nick Cox <> wrote:
> Good question. Here's a stab.
> You can't expect a syntax checker to have a data checker in thrall....
> Nick
> Clyde Schechter
> This isn't a question--it's a warning about something that bit me, and a
> hope that Stata will change it in the future.  (Or perhaps somebody will
> explain why it's actually a useful feature.)
> The following command:
> gen obs_interval = last_follow_up - first_visit if live_status ==
> "Alive":live_statusw
> resulted in obs_interval being set to missing for all observations
> because
> there is no such value label in the dataset as live_statusw.
*   For searches and help try:

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