Hi,
Not sure if this is a gretl issue or an econometric one actually.
I'm trying to come up with a script that replicates Stata's "rreg"
command
which is basically a robust estimation for outliers correction. It is based
on an iterative WLS resulting in an optimal weight vector.
Now, for testing purposes, I'm running OLS and WLS models successively. I
note that the WLS' "Statistics based on the original data" SSR and S.E of
regression are slightly different from the respective OLS' output (*in bold
*below). Should these parts of outputs be the same?
If not, hhat is the difference coming from ?
Best,
Artur
? ols crime X
Model 1: OLS, using observations 1-50
Dependent variable: crime
...
Mean dependent var 566.6600 S.D. dependent var 295.8773
*Sum squared resid 2442333 S.E. of regression 227.9573*
...
? wls W crime X
Model 2: WLS, using observations 1-50
Dependent variable: crime
Variable used as weight: W
...
Statistics based on the weighted data:
Sum squared resid 1925024 S.E. of regression 202.3807
...
Statistics based on the original data:
Mean dependent var 566.6600 S.D. dependent var 295.8773
*Sum squared resid 2469623 S.E. of regression 229.2273*