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: A bug in egen and gen?
From
Maarten buis <[email protected]>
To
[email protected]
Subject
RE: st: A bug in egen and gen?
Date
Fri, 18 Feb 2011 11:20:15 +0000 (GMT)
--- On Fri, 18/2/11, Liao, Junlin wrote:
> I further tested Stata in its capability to assign correct
> data type when importing data. I'm really concerned now.
> Apparently the data type setting has far reaching effect
> other than -gen- and -egen- commands. In fact importing
> procedures also depend on it. If you have numeric values
> with many digits, it's very likely you'll get the wrong
> data.
I would say you get the right data, or at least better
data than you used to have. I am old-fashioned in the
sense that when I say 4.10 I mean that I checked that it
is not less than 4.095 or more than 4.105, and when I say
4.100 I mean I checked that it is not less than 4.0995 or
more than 4.1005. So when I look at data 4.1, 4.10, and
4.100 are to me not the same number. I real data I would
consider 4.1 good data, 4.10 exceptional, and I suspect
someone did not follow proper procedure when I see 4.100.
This is what I meant when I said above that the default
of using floats will improve your data: doubles would
suggest a degree of certainty that is just too preposterous
for words(*). To borrow yet another example from Bill's
Stata Blog entry:
"Most fundamental constants of the universe are known only
to a few parts in a million, which is to say, to less than
float precision, although we do know the speed of light in
a vacuum to one decimal digit beyond float accuracy; it’s
299,793.458 kilometers per second. Round that to float and
you’ll be off by 0.01 km/s."
Can you imagine collecting an entire dataset upto the same
precision as the way the speed of light was measured?
-- Maarten
(*) The one exception to this rule would be identification
numbers, as I mentioned in an earlier post.
--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany
http://www.maartenbuis.nl
--------------------------
*
* 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/