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: more than double precision (higher than 16 digit)

From   "Michael N. Mitchell" <>
Subject   Re: st: more than double precision (higher than 16 digit)
Date   Sun, 28 Nov 2010 18:47:26 -0800

Dear Nicola

  I wonder if you might make a new id variable based on the string variable like this...

sysuse auto
egen id = group(make)

Then you could use the new id variable for the program that requires the numeric id variable.

I hope that helps,

Michael N. Mitchell
Data Management Using Stata      -
A Visual Guide to Stata Graphics -
Stata tidbit of the week         -

On 2010-11-28 4.27 PM, Nicola Man wrote:

I am having problems with precision for a numeric variable (it is an ID variable).  I have been keeping it as a string variable as there are more than 16 digits (the maximum number of exact digits stored in double precision, which problem I also encountered in other softwares like Excel and SPSS).

However, I now want to do some computation with a user-written program in STATA that needs it to be stored as a number.  Would be great if someone would help me with this.

*   For searches and help try:
*   For searches and help try:

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