Bookmark and Share

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: RE: RE: RE: AW: Decimal Precision with Destring


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: RE: RE: RE: AW: Decimal Precision with Destring
Date   Mon, 19 Apr 2010 19:35:42 +0000 (GMT)

--- On Mon, 19/4/10, Sutton, Bennett W. wrote:
> I know these are insanely small hairs to be splitting, but
> unfortunately this work is going into a publication and I
> need to make sure that the rounded result will be 4.5 and
> not 4.6.  (not just here but in many, many other 
> calculations.)

If reproducability across programs is your aim, then your
best bet is probably to multiply your variables with some
multiple of 10 such that the largest value of each variable
has 9 digits after the decimal point, round the variables,
and than store these  variables as -long-s (with the 
factors). Computers have much less trouble representing 
integers, so this way you are more likely to get the same 
results across computer programs.

Hope this helps,
Maarten

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


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