# What is the “root mse” in stata?

I have a question that has been confusing me ever since I took econometrics last year. What does the "root MSE" mean in stata output when you regress a OLS model?

I know that it translates into "root mean squared error", but which variable's mean squared error is it after all, and how is it calculated? Can anybody provide a precise definition and formula, and explain why it is helpful to have that value?

-

1. Calculate the difference between the observed and predicted dependent variables
2. Square them
3. Add them up, this will give you the "Error sum of squares," SS in Stata output
4. Divide it by the error's degrees of freedom, this will give you the "Mean error sum of squares," MS in Stata output
5. Take a square root of it, and this is the Root MSE
6. Done

If you look at the Stata output:

. sysuse auto, clear
(1978 Automobile Data)

. reg mpg weight

Source |       SS       df       MS              Number of obs =      74
-------------+------------------------------           F(  1,    72) =  134.62
Model |   1591.9902     1   1591.9902           Prob > F      =  0.0000
Residual |  851.469256    72  11.8259619           R-squared     =  0.6515
Total |  2443.45946    73  33.4720474           Root MSE      =  3.4389

------------------------------------------------------------------------------
mpg |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
weight |  -.0060087   .0005179   -11.60   0.000    -.0070411   -.0049763
_cons |   39.44028   1.614003    24.44   0.000     36.22283    42.65774
------------------------------------------------------------------------------


Dividing the sum of squares of the residual (851.469) by its degrees of freedom (72) yields 11.826. That is the mean sum of squares. If you further take a square root, you'll get Root MSE (3.4289 in the output).

Basically, it's a measurement of accuracy. The more accurate model would have less error, leading to a smaller error sum of squares, then MS, then Root MSE. However, you can only apply this comparison within the same dependent variables, because MS and Root MSE are not standardized. Depending on the unit of measurements, Root MSE can vary greatly.

-
I see, so this is essentially the OLS estimate of the error term... Thanks! –  Vokram Nov 1 '12 at 18:22
@Vokram Yes, but with a square root so that its unit is the same as the original unit of your dependent variable's. Just a nice gesture; you can do the same comparison with MS alone. –  Penguin_Knight Nov 1 '12 at 18:25

RMSE is the std dev of the model's error. Wikipedia can tell you this and the formula: http://en.wikipedia.org/wiki/Root-mean-square_deviation

With it, you can compare model accuracy

-
kirk, I understand what MSE and RMSE are, but maybe I didn't make it clear in the question, I hope to know what the RMSE outputted when using stata is calculating. Specifically, which variable's rmse is it calculating and how? After all the software does not know the true value... –  Vokram Nov 1 '12 at 18:07
Since the RMSE is calculated as sqrt(RSS/n-k) and RSS=sum[(y-hat(y)^2], it is calculating the entire regression model's RMSE. hat(y) is the predicted y, and you already have y in your data. –  kirk Nov 1 '12 at 18:19
So it is not a particular variables error, but the models error –  kirk Nov 1 '12 at 18:21
Thank you kirk! So the RMSE is calculating the consistent estimator of error term under CLM assumptions.. Strange that they call it RMSE though... –  Vokram Nov 1 '12 at 18:25