R-squared in WLS estimation

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

onet
Posts: 3
Joined: Sat Oct 17, 2009 9:56 am

R-squared in WLS estimation

Postby onet » Sat Oct 17, 2009 10:39 am

I have estimated a model using WLS. Unweighted and unweighted R-squared is reported. I think I know how the unweighetd R-squared is calculated (unweighted data but coefficients from weighted estimation) but I wonder how weighted R-squared is calculated? I used to think that it simply is R-squared using weighted data. Is that the case?
Also, there seems to be some change between Eviews 5.1 and 6 because I get very different weighted R-squared for the exact same regression depending on which version I use.

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: R-squared in WLS estimation

Postby EViews Glenn » Mon Oct 19, 2009 11:52 am

It's the R2 from the weighted data...(which is a bit more complicated than just that statement).

My recollection is that the R2 in EViews 5 was specified to match the earlier results for pools, but that we were unhappy with it so that we changed the definition of the weighted R2 in EViews 6. The issue is what you take to be the restricted model, which can be somewhat tricky in a model where you are also estimating the weights. The newer version restricts the weighting matrix for the restircted model to be the same as the unrestricted estimator, then computes the restricted model and appropriate sums-of-squares. This is more in line with the differences that one would observe via coefficient testing.

onet
Posts: 3
Joined: Sat Oct 17, 2009 9:56 am

Re: R-squared in WLS estimation

Postby onet » Tue Oct 20, 2009 7:53 am

Thanks for the reply but I do not quite get it and would like some more information. Perhaps a formula.
R2 as I understand it (sloppy notation):
R2 in OLS: 1 – u’u/(y-c)’(y-c) where u = y – xb and c is the mean of y
Unweighted R2 in WLS: 1 – u’u/(y-c)’(y-c), where u = y – x b* , where b* coefficient calculated using weighted data
Weighted R2 in WLS: 1 – u*’u*/(y*-c*)’(y*-c*), where u* = wy – wx b*, where b* coefficient calculated using weighted data, w weight, c mean of weighted y
I do not understand where the restricted/unrestricted model fits into this. Has it got to do with the the weighting?
Last edited by onet on Fri Oct 23, 2009 11:01 am, edited 2 times in total.

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: R-squared in WLS estimation

Postby EViews Glenn » Tue Oct 20, 2009 12:52 pm

The restricted designation is relevant for the denominator in the R2.

The u* are the residuals from the transformed data using the coefficients in the unrestricted model. In pseudo-math

(y-xb*)Omega^{-1}(y-xb*)

where the Omega is the estimated weighting matrix, and b* are the estimated coefficients using Omega.

The denominator in the R2 is formed from the weighted residuals from a constant only model using the Omega.

(y-c)Omega^{-1}(y-c)

where c is the estimated coefficient using Omega.

onet
Posts: 3
Joined: Sat Oct 17, 2009 9:56 am

Re: R-squared in WLS estimation

Postby onet » Fri Oct 23, 2009 11:03 am

Thanks! And sorry for the several mistakes in my last post (I have edited it).
What did the calculation look like in version 5? I get very different R2 in my regressions depending on version (extremely high in version 5, around 0,97-0,99 which made me suspicious, in version 6 it is more reasonable 0,5-0,7).

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: R-squared in WLS estimation

Postby EViews Glenn » Fri Oct 23, 2009 12:33 pm

The fitted c was derived from the mean of the transformed data. The 6 definition is better.


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests