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

Re: st: double to integer


From   Seb Buechte <[email protected]>
To   [email protected]
Subject   Re: st: double to integer
Date   Fri, 8 Apr 2005 00:22:51 +0200

Oleksandr,

maybe all values of id exceed the range of the integer type (-32,767
to 32,740; whelp datatypes) if so try recasting it to long. In case
that does not work either then you might have all values staying
outside the intervall  -2,147,483,647 to 2,147,483,620. This could
happen with a double variable, at least from what I understand.

sebastian

On Apr 7, 2005 9:29 PM, Oleksandr Shepotylo <[email protected]> wrote:
> Hi,
> 
> I have integer variable that is stored as double.
> I tried to change it to integer using
> 
> recast int id
> 
> getting message "id would be changed... no changes made"
> 
> if i use
> 
> recast int id, force
> 
> it gives all missing
> 
> Any ideas how to change it to integer?
> 
> Thanks,
> 
> Oleksandr.
> *
> *   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/
> 


-- 
- Seb F Buechte
-
- Stay tuned!
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index