Page 1 of 1

WLS with robusterror

Posted: Wed Nov 25, 2015 10:10 am
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,

Re: WLS with robusterror

Posted: Wed Nov 25, 2015 11:31 am
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.

Re: WLS with robusterror

Posted: Wed Nov 25, 2015 7:32 pm
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.