Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

RE: st: dropping values

From   "Nick Cox" <>
To   <>
Subject   RE: st: dropping values
Date   Tue, 8 Jun 2010 15:29:11 +0100

This is the classic precision problem. -search precision- for FAQs,
articles, etc. and note that Stata struggles to cope with 0.2 as a exact
binary, as well it might. 

. di %23.18f 0.2

. di %21x 0.2

. di %21x 2


I think there is a problem with dropping values of a variable.

I have a variable named so2conc and it has values 0 .2 .25 .3 .4 .5 .6
If I use
drop if so2conc==0.2
nothing gets dropped.

If I use
egen so2=group(so2conc)
and then
drop if so2==2
then I get dropped what I need dropped.
I think the problem is that so2conc is stored as a real value.

Has anyone else had this problem or is there something written about
avoiding this problem?

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index