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

st: Re: how to read a 18 digits variable


From   Roger Newson <[email protected]>
To   [email protected]
Subject   st: Re: how to read a 18 digits variable
Date   Wed, 04 Feb 2004 12:20:09 +0000

At 19:31 03/02/04 +0100, Clara wrote:

Hello, we are reading a data set in which the variable that identifies the individual is 18 digits long. We have storaged this variable as a double type variable, but the variable is not read correctly. It looks like only 16 digits have been read.

How can we get stata read this variable with 18 digits of accuracy.

The best way is probably to read and store the ID as a string variable of type str18, instead of a numeric variable of type double. You can still sort and merge by a string ID.

I hope this helps.

Roger


--
Roger Newson
Lecturer in Medical Statistics
Department of Public Health Sciences
King's College London
5th Floor, Capital House
42 Weston Street
London SE1 3QD
United Kingdom

Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
or 020 7848 6605 International +44 20 7848 6605
Email: [email protected]
Website: http://www.kcl-phs.org.uk/rogernewson

Opinions expressed are those of the author, not the institution.

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