Ed wrote:
I have searched within the archives and cannot find an answer to my
problem. Please correct me if I am missing anything obvious.
I have strange results when calculating (basic) stats for a variable. I
assume there is some sort of data corruption, but I have never seen this
before, so any pointers would be helpful.
Here is a listing of my data (I have added an if condition to keep the
example simple).
. li oil_level gdp if id==211
+-------------------------------+
| oil_le~l gdp |
|-------------------------------|
1059. | 548.9 15492.840168784467 |
1060. | 575.7 16248.206511636326 |
...
1097. | 912.3 34875.37198079319 |
1098. | 948.7 36098.15411932452 |
+-------------------------------+
The listing above is correct and matches the raw data.
Here is a summ of the two series:
. summ oil_level gdp if id==211
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
oil_level | 40 781.27 93.45438 548.9 948.7
gdp | 40 3019.45 771.8664 1673 4237
Note the gdp is obviously wrong. Any ideas?
...
Stata versions: 9.2, both Windows and Linux experience the same problem.
------------------------------------------------------------------------
-
I -input- your data from your listing and generated:
generate id = 211
I can not reproduce your -summarize- output, neither with Stata 10.0 nor
Stata 9.2; I get:
. summarize oil_level gdp if id==211
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
oil_level | 40 781.27 93.45438 548.9 948.7
gdp | 40 24624.71 6083.753 15492.84 36098.15
Looks like a human error to me. Are you sure nothing happened to your
data between the -list- and the -summarize- command?
Svend
__________________________________________
Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology)
Vennelyst Boulevard 6
DK-8000 Aarhus C, Denmark
Phone: +45 8942 6090
Home: +45 8693 7796
Email: [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/