[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
Philip Ryan <philip.ryan@adelaide.edu.au> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: a question about an identifying variable with more than 10 digits |

Date |
Thu, 05 Feb 2004 12:03:05 +1030 |

Stata uses different storage types (see - help datatypes-) to store numbers, and these types accommodate different levels of precision. By default Stata will store numbers as "float" which only have 7 digits of accuracy. You should store identifiers as either "long" or "double" types (in your case, with 10 or more digits, as "double"). Better would be to store identifiers as strings, unless there is a good reason to do otherwise. This avoids the numeric precision problem altogether.

Apart from -help datatypes- there are some useful FAQs on the matter, -findit precision- leads to some. The Users Manual, section 16.10 has a discussion.

Phil

At 05:20 PM 4/02/2004 -0800, you wrote:

of more than 10 digits, and find that in some cases, the STATA does not distinguish two different individuals when the first 9 digits of the id are the same for the two individuals. For example, suppose that there are two individuals whose ids are 1234567890 and 1234567891, respectively, - the ids differ only in the last digit. Then, the STATA displays the two ids in a scientific notation like 1.234E+9 and seems to treat the two individuals as the same one. I am wondering if there is a way to have the STATA distinguish them. I found a similar problem when a variable has more than 9 digits following the decimal point.

Hyung-Jai Choi

*

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

Philip Ryan Associate Professor, Department of Public Health Associate Dean (Information Technology) Faculty of Health Sciences University of Adelaide 5005 South Australia tel 61 8 8303 3570 fax 61 8 8223 4075 http://www.public-health.adelaide.edu.au/ CRICOS Provider Number 00123M ----------------------------------------------------------- This email message is intended only for the addressee(s) and contains information that may be confidential and/or copyright. If you are not the intended recipient please notify the sender by reply email and immediately delete this email. Use, disclosure or reproduction of this email by anyone other than the intended recipient(s) is strictly prohibited. No representation is made that this email or any attachments are free of viruses. Virus scanning is recommended and is the responsibility of the recipient. * * 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/

**References**:**st: a question about an identifying variable with more than 10 digits***From:*Hyung-Jai Choi <hchoi5@u.washington.edu>

- Prev by Date:
**Re: st: Re: Cannot write in directory** - Next by Date:
**[no subject]** - Previous by thread:
**st: a question about an identifying variable with more than 10 digits** - Next by thread:
**Re: st: Re: Cannot write in directory** - Index(es):

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