Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: st: float to numeric??


From   "Airey, David C" <david.airey@Vanderbilt.Edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   re: st: float to numeric??
Date   Sun, 20 Jun 2010 22:26:07 -0500

.

Check out the -float()- function.

http://www.stata.com/help.cgi?data+types

http://www.stata.com/help.cgi?float

> Hi everyone,
> 
> 
>  I have a variable stored as float chip eligibility rate variable.  very
> straightforward - varies between .1 and 4.  But it is stored as float and
> gives me major toruble when I am using the values to generate new
> variables etc.  I would like to store it as numeric so that stata can
> recognize the values of this variable.  Does anyone have experience with
> this??
> . codebook chipeligrate
> 
> ------------------------------------------------------------------------------
> chipeligrate                   chip eligibility rate by year and age and
> state
> ------------------------------------------------------------------------------
> 
>                   type:  numeric (float)
> 
>                  range:  [.1,4]                       units:  .01
>          unique values:  40                       missing .:  0/6585
> 
>                   mean:   1.92923
>               std. dev:   .720279
> 
>            percentiles:        10%       25%       50%       75%       90%
>                                  1       1.5         2         2         3
> 
> I need to chnage this variable and store is as int but I can not figure
> out how. So far I tried compress but it seemed to work but when I
> described the variable, still float.
> 
>  Thanks so much for your help in advance.
> 
> 


-Dave
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index