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   "Joseph Coveney" <[email protected]>
To   <[email protected]>
Subject   Re: st: A bug in egen and gen?
Date   Sat, 19 Feb 2011 00:28:00 +0900

Junlin Liao wrote:

Unless someone changed the command, my version of Stata 11 does not compress
double to float when it can do so.

Nick Cox wrote:

You should supply specific examples of where you think that is not
happening.

--------------------------------------------------------------------------------

Junlin might mean something akin to this:

. clear *

. set obs 3
obs was 0, now 3

. generate double compressable = 1 / 2^_n

. display in smcl as text "`: type compressable'"
double

. compress

. display in smcl as text "`: type compressable'"
double

. assert compressable == float(compressable)

. recast float compressable

. display in smcl as text "`: type compressable'"
float

. exit

end of do-file

I don't recall ever encountering real data where this would have come in handy.

Joseph Coveney



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