Weighted Least Sq (15)
Weighted Least Sq (15)
Weighted Least Sq (15)
PURPOSE
The purpose of WLS is to improve model accuracy when the assumptions of ordinary least squares (OLS)
regression are violated, specifically the assumption of constant variance in residuals.
HOW IT WORKS
• A variation of the ordinary least squares (OLS) method, WLS adds a weight variable W, to the model.
• The weight are proportional to the inverse of the response variable. The method of ordinary least squares
assumes that there is constant variance in the errors (which is called homoscedasticity).
• The method of weighted least squares can be used when the ordinary least squares assumption of constant
variance in the errors is violated (which is called heteroscedasticity). The model under consideration is
y = xβ + ϵ∗ (1)
1 WHEN
• Handle non-constant variance of the error terms in linear regression.
• Handle non-constant variance of the error terms in linear regression.
2 WHY
• WLS regression is used to correct heteroscedasticity which is when the error variance is non constant.
• In WLS regression more weight is given to observations with smaller variance which are more reliable.
Descember 2024
3 Scatter Plot
x vs y
From this scatter plot, the overall relationship between X and Y appears to be positive linear relationship
but there may be some heteroscedasticity (non-constant variance of Y at different levels of X) and clustering in
the data.
2
5 OLS RESIDUALS PLOT
3
7 WLS RESIDUALS PLOT
The WLS residuals appear more evenly spread compared to the OLS residuals,
it indicates that the WLS model effectively handled the heteroscedasticity. OR
it is say that the spread of residuals is more consistent and centered around zero
compared to the OLS residual plot, it demonstrates the effectiveness of WLS.
8 SUMMARY
• The WLS β0 (0.88929) is lower than the OLS β0 (0.58052).
• The difference arises because WLS adjusts for heteroscedasticity, reducing the influence of
data points with high variance, which may pull the OLS β0 upward.
• The β1 in WLS is slightly larger than in OLS .The higher β1 in WLS suggests that ob-
servations with lower variance, which are weighted more heavily, have a stronger positive
relationship between x and y.
• The standard errors of coefficients are significantly smaller in the WLS model. This reduc-
tion indicates that WLS provides more precise estimates due to its ability to account for
heteroscedasticity.
• R2 for WLS (0.92054) is higher than OLS (0.84011) indicating that the WLS model explains
a larger proportion of the variance in Y.This suggests that WLS provides a better fit to the
data.
• The standard error of the estimate of WLS is lower than OLS further indicating that the
WLS model produces more accurate predictions with less error.OR it is more efficient when
heteroscedasticity is present.
9 NPP
NPP
4
Residuals generally fall on a straight line, implying that the errors are normally
distributed. This implies that the proposed model is adequate and excludes any
possibility of independence violation or a constant variance assumption.