Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE:  st: dropping values
From 
 
"Nick Cox" <[email protected]> 
To 
 
<[email protected]> 
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
   0.200000000000000010
. di %21x 0.2
+1.999999999999aX-003
. di %21x 2
+1.0000000000000X+001
Nick 
[email protected] 
[email protected]
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
1.0
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:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/