Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RMSE


From   "Daniel Schneider" <daniel.schneider@stanford.edu>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RMSE
Date   Tue, 25 Apr 2006 17:21:23 -0700

I have encountered a small problem with calculating the RMSE by hand and
comparing it to the Stata output and I was wondering if anyone has an
explanation (or more precisely: what is wrong with the way I calculate
the RMSE?):

. sysuse lifeexp
(Life expectancy, 1998)
 
. quietly: regress popgrowth safewater

. display e(rmse)
.84918997

. predict resid,res
(28 missing values generated)

. gen resid2=resid^2
(28 missing values generated)

. sum resid2

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
      resid2 |        40    .6850674    .8970437   .0050698    3.46198

. display sqrt(.6850674)
.82768798

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