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

st: sum of residuals=zero?


From   "Giovanni Vecchi" <[email protected]>
To   <[email protected]>
Subject   st: sum of residuals=zero?
Date   Sat, 9 Nov 2002 10:45:56 +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 understand the reason for 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   [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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index