WLS with robusterror

Use this forum to post questions about syntax problems or general programming issues. Questions on implementing a particular aspect of econometrics should go in "Econometrics Issues" below.
T_FIELD
Posts: 44
Joined: Sat May 15, 2010 8:03 pm

WLS with robusterror

Unread post by T_FIELD »

Could you tell me the difference of standard errors of the following two estimator?

linreg(weight=num,robusterror) y /
# constant x

set ww = (1/num)
linreg(spread=ww,robusterror) y /
# constant x

I checked that the standard error from the first code was calculated by using (1) residuals = y – beta(WLS)*x and (2) weighted variables (py, px). However, it seems to be a wrong estimator as suggested in Rats User Guide 810, pp UG-44. How does Rats compute the second, correct standard errors? I am happy if you could explain in line with the equation (15) on page 44 in the Guide.

Sincerely,
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: WLS with robusterror

Unread post by TomDoan »

The User's Guide says that WEIGHT is for probability weighting (for instance, in EM calculations in switching models), not for heteroscedasticity correction so don't use the former if you intend the latter. The two aren't the same and aren't intended to be. With the WEIGHT option, any sum uses w(t) weights on whatever is being summed. Computing robusterrors involves a fourth moment calculation (sum of X(t)'u(t)u(t)X(t)) which will end up with four factors of the 1/sqrt(spread) when you do the SPREAD option so it won't match up with the single w(t) weight.
T_FIELD
Posts: 44
Joined: Sat May 15, 2010 8:03 pm

Re: WLS with robusterror

Unread post by T_FIELD »

I could ontain the estimate with spread option by hand calculation when I used weighted residuals for X(t)'u(t)'u(t)X(t).
Thank you so much for your kind assistance.
Post Reply