Yesterday Ed Blackburne <[email protected]> reported some odd results that
suggested data corruption in Stata. That problem is resolved. The data were
not corrupted.
The point of this posting is not to embarrass Ed, but to reassure anyone
who was worried.
It was human error, but certainly an unexpected one. The problem was that
Ed was using labels, so the listed data looked different from how they
actually were. Here's the idea:
Say I have the following dataset:
. list
+---+
| a |
|---|
1. | 1 |
2. | 2 |
+---+
Now say I do the following:
. label define mylab 1 1000 2 2000
. label values a mylab
With that done, here is what I see whan I list the data:
. list
+------+
| a |
|------|
1. | 1000 |
2. | 2000 |
+------+
So now I type
. gen new = a*10
. list
+------------+
| a new |
|------------|
1. | 1000 10 |
2. | 2000 20 |
+------------+
and it looks to me as if Stata is broken or the data are corrupted or,
at the very least, as if Stata doesn't know how to multiply.
I don't know the exact details in Ed's case, but I gather than Ed infile'd his
data using the automatic label generation option, and so the looked fine to
him, but it fact contained 1, 2, ...
-- Bill
[email protected]
*
* 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/