Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: re: discerning a variable's "type"


From   Kit Baum <kitbaum@mac.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: re: discerning a variable's "type"
Date   Mon, 2 May 2005 11:16:35 -0400

David said
I would add that -compress- will not change a float to a long (if the
values are all integers, but includes values too large for int or byte), as
that does not reduce the storage space. If you are interested in converting
float to long -- because it is the appropriate type for an integer-valued
variable, then I recommend my -floattolong- program. See -ssc desc
floattolong-.

Quite so. I was thinking mainly of the case where the data have been acquired from another package in which everything is stored as float (without optimization; Stat/Transfer can fix this on the fly), so that even dummy variables or 1-5 indices are stored as floats.

Kit Baum, Boston College Economics
http://ideas.repec.org/e/pba1.html

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index