Statalist The Stata Listserver


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

st: weighted regression


From   "Nikolaos A. Patsopoulos" <[email protected]>
To   [email protected]
Subject   st: weighted regression
Date   Thu, 18 Jan 2007 12:01:23 +0200

Dear statalist members,

in a weighted regression with what do I have to divide the weighted SE to get the unweighted one?

Some sample data and results:
WEIGHTED
var1 var2 weight
0 3.4 1
1 4.7 2
2 9.2 2

regress var2 var1 [aweight= weight]

(sum of wgt is 5.0000e+00)

Source | SS df MS Number of obs = 3
-------------+------------------------------ F( 1, 1) = 9.37
Model | 16.4437701 1 16.4437701 Prob > F = 0.2010
Residual | 1.75542889 1 1.75542889 R-squared = 0.9035
-------------+------------------------------ Adj R-squared = 0.8071
Total | 18.199199 2 9.09959951 Root MSE = 1.3249

------------------------------------------------------------------------------
var2 | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
var1 | 3.128571 1.022203 3.06 0.201 -9.859744 16.11689
_cons | 2.485714 1.445613 1.72 0.335 -15.88254 20.85397
------------------------------------------------------------------------------

UNWEIGHTED
var1 var2
0 3.4
1 4.7
2 9.2
1 4.7
2 9.2

. regress var2 var1

Source | SS df MS Number of obs = 5
-------------+------------------------------ F( 1, 3) = 28.10
Model | 27.4062836 1 27.4062836 Prob > F = 0.0131
Residual | 2.92571481 3 .97523827 R-squared = 0.9035
-------------+------------------------------ Adj R-squared = 0.8714
Total | 30.3319984 4 7.58299959 Root MSE = .98754

------------------------------------------------------------------------------
var2 | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
var1 | 3.128571 .5901689 5.30 0.013 1.25039 5.006752
_cons | 2.485714 .8346249 2.98 0.059 -.1704347 5.141863
------------------------------------------------------------------------------

I believe I have to divide the weight SE (1.022203) with the ResidualMS (1.75542889), which gives 0.582309.


Is this correct?

Thanks in advance,

Nikos

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