Weighted Least Squares
Match the weight to the error variance
Ordinary least squares gives every squared residual equal numerical weight. If the error variance differs systematically across observations, OLS is still unbiased for slopes under the usual exogeneity conditions, but it is generally no longer the most efficient linear unbiased estimator, and its usual homoscedastic standard errors can be misleading.
Weighted least squares addresses a specified variance pattern by minimizing a weighted sum of squared residuals.
For independent observations with Var(εi)=σi2, the conventional WLS weight is wi=1/σi2, up to a shared positive constant. A smaller variance gets a larger weight because a residual measured with less noise contains more precision. The weight is inverse variance, not inverse standard deviation and not the variance itself.
In matrix notation, β̂WLS=(XTWX)−1XTWy when W is the appropriate inverse covariance matrix. Independent errors have a diagonal covariance matrix, so W is diagonal.
A diagonal covariance matrix alone establishes uncorrelated errors, not necessarily independence. Equivalently, multiply each row of X and y by the square root of its weight and fit ordinary least squares to those transformed quantities.
The variance model deserves diagnosis. Residual plots, known measurement precision, and replicated measurements can motivate a form for unequal variance, but an estimated weight model introduces uncertainty of its own. WLS does not make a nonlinear mean relationship linear, remove influential outliers, prove random sampling, or establish a causal interpretation.
Two independent observations have known error variances 4 and 16, respectively. Under inverse-variance WLS, how do their relative weights compare?
A regression has a correctly specified linear conditional mean, independent errors, and error variance known to increase with a measurement's exposure time. What does correctly implemented WLS directly address?