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: A bug in egen and gen?


From   Nick Cox <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   RE: st: A bug in egen and gen?
Date   Fri, 18 Feb 2011 10:36:24 +0000

As said, I can -compress- doubles to bytes when there is no loss of precision. 

. about

Stata/SE 11.1 for Windows (32-bit)
Born 04 Nov 2010
Copyright (C) 2009 StataCorp LP

[...] 

. set obs 1
obs was 0, now 1

. gen double compressable = 42

. compress
compressable was double now byte

You should supply specific examples of where you think that is not happening. Please use the %21x format to make clear what is happening at machine level. 

Nick 
[email protected] 

Liao, Junlin

Unless someone changed the command, my version of Stata 11 does not compress double to float when it can do so. This is also indicated in the documentation. However, I can recast a variable to float if there is no loss of precision, otherwise I have to put in the /force option to force convert with loss of precision.


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