Statalist The Stata Listserver


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

Re: st: standard errors in regression


From   "Alan Neustadtl" <alan.neustadtl@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: standard errors in regression
Date   Tue, 15 Aug 2006 12:56:05 -0400

I don't have a text book at home to look at but I suspect that this
has to do with the degrees of freedom.  If I simplify your example by
calculating a bivariate regression and adjust the df's as follows:

sysuse auto, clear
reg price mpg
sum mpg
di e(rmse)/(sqrt(r(N)-1)*r(sd))

I get the same statistic as Stata to the fourth decimal place.

However, when I use n-2 which I thought would work in your case, the
number is still off.

Many statistics books devote the bulk of their attnetion to the
bivariate case and less time to the extension of statistical tests to
the multivariate case since th elogic is similar.  Furthermore, I
notice disagreement about the df's across books.  Of couse, the df's
are less importnt with larger sample sizes.

Best,
Alan



On 8/15/06, Maarten Buis <M.Buis@fsw.vu.nl> wrote:
I am a bit puzzled. I always thought (and just checked it in
several books) that in OLS regression the standard error of
the coefficient for explanatory variable x is:

root mean squared error / { sqrt(N) * standard deviation of x }

However if I try that in Stata and compare it with Stata output
(see example below) I get numbers that are close, but differ
enough for me to suspect that the cause of the difference is
more than just numerical / rounding errors in my calculation.
What am I missing?

Thanks,
Maarten

*-------begin example------
sysuse auto, clear
reg price mpg foreign
sum mpg
di e(rmse)/(sqrt(r(N))*r(sd))
*------end example-------

-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting adress:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


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

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