In a situation where homoskedasticity (constant variance) is violated, the estimated residuals need to be corrected with appropriate procedure to obtain robust estimates. In the case of heteroskedasticity of known form, it is advisable to use the weighted least squares (WLS).  As the name suggest, you must specify a weighting variable, and it has to be strongly correlated to the estimated residuals.   The choice of the weight is very crucial and can greatly affect the estimated parameters.  In many cases the appropriate weight may be unknown.  Alternatively, residuals from OLS are often used as the weight.

In i-Regand the weight is rescaled by its mean, unless the mean is zero.  All variables are multiplied by the rescaled weight before the regression (LS) is carried out.  Hence, the weight is only applied once. For technical detail you may consult to the following references:

Green, W.H (2003), Econometric Analysis (5th edition). Prentice Hall.

Heij, C et.al (2004), Econometric Methods with Applications in Business and Economics. Oxford University Press.

Sheather, S.J (2009), A Modern Approach of Regression with R. Springer.

Weisberg, S (2005), Applied Linear Regression (3rd edition). Willey-Interscience.

## WLS estimation

The only contrast between OLS and WLS is the weighting variable.  Now, we have three categories of variables: dependent, explanatory and weighting variables.  It is important that you have the correct model for explaining heteroskedasticity.  If not, the application of WLS can be very problematic. Alternatively, you may use White’s robust standard errors.

You can run WLS in i-Regand, simple and straightforward:

Step 1, Tap on the add estimation button and select weighted least squares

Step 2, Define a dependent variable, explanatory variables, and a weighting variable.

Step 3, Run and see the results.

Unlike OLS, there are two types of statistics in WLS namely weighted and unweighted statistics.  The former corresponds to the weighted residuals, while the latter is derived from the unweighted residuals.  See the references for technical details.