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

st: sum of residuals=zero?


From   "Giovanni Vecchi" <vecchi@economia.uniroma2.it>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: sum of residuals=zero?
Date   Mon, 11 Nov 2002 08:54:44 +0100

Dear statalisters:

I would appreciate your comments on the following:

use auto.dta
regress price mpg

(output omitted)

predict resid,res

egen sumres=sum(resid)

sum sumres

    Variable |     Obs        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------
      sumres |      74   -.0004654          0  -.0004654  -.0004654


The sum of residuals (which should be zero according to the theory) is
-.0004654. This estimates looks "high" to me.
I run the code above in Gauss and obtained a much lower estimates
(something like 9*10^-10).

Any suggestion to explain the above discrepancy?


Thank you.

Giovanni


-----------------------------------------------
Giovanni VECCHI
Dipartimento di Economia e Istituzioni
UniversitÓ di Roma "Tor Vergata"
Via Columbia, 2
00133 Roma
Italy

voice + 39 (06) 7259 5730
fax   + 39 (06) 2020 500
email   vecchi@economia.uniroma2.it
-----------------------------------------------

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