Professional Documents
Culture Documents
2
+The Use of Weighted Least Squares
3
+
Examples: Variance Proportional
to n and x
Suppose Yi = Per Capita GDP. Then
4
+
Weighted Least Squares Model
Consider the straight line regression model
wi large wi small
Variance of errors close to
0. Variance of errors large.
6
+
Derivation
To take into account the weights when we estimate the
regression parameters, we consider the following
weighted version of the residual sum of squares:
7
+
Derivation
8
+
Special Case: Multiple
measurements at each value of
x
70 50
Rooms
30 10
2 4 6 8 10 12 14 16
Crews
9
+
Special Case: Multiple
measurements at each value of
x
Consider the simple linear regression model
10
+
Cleaning Example
Number n Standard
of deviation
Crews (Yi)
2 9 3.00
4 6 4.97
6 5 4.69
8 8 6.64
10 8 7.93
12 7 7.29
16 10 12.00
11
+
Cleaning Example: Old model
with square root
transformations
0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 Scale-Location
31
5
46
Standardized residuals
3 4 5 6 7 8
Fitted values
lm(y2 ~ x2)
12
+
Cleaning Example: New
weighted model, no
transformations
Scale-Location
1.5 31
10
34
Standardized residuals
0.5 0.01.0
10 20 30 40 50 60
Fitted values
lm(clean$Rooms ~ clean$Crews)
13
+
Case 2: X continuous
14
+
Case 2: X continuous
Calculating weighted least squares:
15
+
Case 2: X continuous
We can calculate the least squares fit of the first model
by calculating the least squares fit to the second, which
is a multiple linear regression model with two
predictors and no intercept. Use the following
substitutions:
16
+
Case 2: X continuous
In other words, we can rewrite:
17
+
Another Parameterization:
18