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

From   Marcello Pagano <>
Subject   Re: st: A bug in egen and gen?
Date   Fri, 18 Feb 2011 08:16:40 -0500

Don't forget the "missings"; an important consideration to practicing statisticians!


On 2/18/2011 5:36 AM, Nick Cox wrote:
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.


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:
*   For searches and help try:

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