Statalist


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

Re: Re: st: RE: Splitting numeric values


From   n j cox <n.j.cox@durham.ac.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: Re: st: RE: Splitting numeric values
Date   Tue, 24 Jul 2007 17:04:54 +0100

Note that Maarten was right and I was havering on this
point. A string variable is needed for your purposes.
A -double- will not suffice. Sorry about that.

Nick
n.j.cox@durham.ac.uk

Maarten buis

--- On Jul 23, 2007, at 8:32 PM, Susan Olivia wrote:
> > I think the culprit is due to having the id as numeric variable
> > that comes with 18 digits and stored as double as suggested by
> > Profs Buis and Cox.

As I said before, you can store only 16 digits in a double variable, so
the last two digits of the variable id are now random noice and do not
correspond to the variable id in your original dataset.

--- "Michael S. Hanson" <mshanson@wesleyan.edu> wrote:
> Assuming your original data are in Excel, I suspect you'd be in much
> better shape overall if you read the "id" variable in as a string
> from the start.

This is actually the only way to store all 18 digits of your id
variable.

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