Geography Reference
In-Depth Information
with only one column; this latter type of matrix is called a vector. h e following are
examples for the case of two variables and i ve cases (observations) of each:
È
1
1
y
˘
È
z
˘
1
1
Í
˙
Í
˙
y
z
Í
˙
Í
˙
2
2
11111
È
˘
Í
˙
T
Í
˙
Y
=
1
y
,
Y
=
,
z
=
z
Í
˙
3
3
yyyy y
Í
˙
Í
˙
Î
˚
1
2
3
4
5
1
1
y
z
Í
˙
Í
˙
4
4
Í
˙
Í
˙
y
z
Î
˚
Î
˚
5
5
Y T indicates the transpose of Y —the l ipped version of the original matrix (values
in the let -hand column of Y are the top row in Y T and values in the right-hand column
of Y are the bottom row in Y T ). h e superscript -1 indicates the inverse, and this
is explained in Appendix E. h e '1' values for each entry in Y indicate that we are i t-
ting a constant (intercept). In this example, we have i ve 1s, and i ve values of each of
the independent ( y ) and the dependent ( z ) variables. Given Equation 3.9 and a knowl-
edge of matrix algebra it is possible to i nd the regression coei cients for any number
of independent variables. Computers make use of matrices, and so some understand-
ing of how to use such methods is useful. Appendix E shows how Equation 3.9 is
solved.
h e solution to Equation 3.9 for the data presented above is given by (with the full
working given in Appendix E):
0.36169
-
0.00780
297
8.871
È
˘
È
˘
È
˘
b
=
(
YY
T
)
-
1
Yz
T
=
¥
=
Í
˙
Í
˙
Í
˙
-
0.00780
0.00024
12629
0.751
Î
˚
Î
˚
Î
˚
where the calculations used to obtain the i nal values (the intercept and slope), shown
in the matrix to the right-hand side above, are:
b
b
=
(0.362
¥
297)
+ -
(
0.0078
¥
12629)
=
8.871
(intercept)
0
=-
(
0.0078
¥
297)
+
(0.00024
¥
12629)
=
0.751
(slope)
1
Note that the value of b 0 is smaller than the value obtained previously. h is is due to
rounding error (i.e. a dif erent number of decimal places used in calculations).
h e strength of the relationship between the variables can be measured using the
correlation coei cient. h e correlation coei cient, r , is given by:
n
Â
(
yyzz
-
)(
-
)
i
i
i
=
1
r
=
(3.10)
Â
n
Â
n
2
2
(
yy
-
)
(
zz
-
)
i
i
i
=
1
i
=
1
h e numerator is the same as for the estimation of b 1 (see Equation 3.7). h e
denominator is simply the square root of the sum of squared dif erences between y
 
Search WWH ::




Custom Search