[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Re: egen rowfirst and rowlast quirks
It does sound like a rounding problem due to precision. How many digits are
these numbers? Are you generating doubles or longs? If you have a number
that is 24 digits off, I'm wondering how you expect to hold the value
accurately using double precision? You should probably type -findit
precision- and follow some of those links.
Are these actually numeric values or are they identifiers which could be
held as text?
----- Original Message -----
From: "Abbe Will" <email@example.com>
To: "Stata Listserv" <firstname.lastname@example.org>
Sent: Monday, September 11, 2006 3:22 PM
Subject: st: egen rowfirst and rowlast quirks
In using the -egen newvar=rowfirst(varlist)- and rowlast commands, I am
coming up against a strange quirk where occasionally the value of the new
variable is not an exact copy of the first or last value as it should be.
Out of 900 observations, about 25 first and last values are created which
do not match the actual first and last values exactly. Most of these new
values are only one digit higher or lower than the original (sounds like
rounding, right?), but a few are 2 digits off, one 11 digits off, one
24.... There seems to be no pattern to which numbers get altered and how.
My data are positive integers, so there should be no way to round anyway.
I'd greatly appreciate any thoughts or comments. Thanks!
* For searches and help try: