Multiple Correlation
We can also calculate the correlation between more than two variables.
(计算多变量之间的相关性)
定义1: 给定变量
x
x
x,
y
y
y,
z
z
z,
multiple
correlation
coefficient
\textbf{multiple correlation coefficient}
multiple correlation coefficient (复相关系数)
(1)
R
z
,
x
y
=
r
x
z
2
+
r
y
z
2
−
2
r
x
z
r
y
z
r
x
y
1
−
r
x
y
2
R_{z,xy} = \sqrt{\frac{r_{xz}^2+r_{yz}^2-2r_{xz}r_{yz}r_{xy}}{1-r_{xy}^2}}\tag{1}
Rz,xy=1−rxy2rxz2+ryz2−2rxzryzrxy(1)
其中
r
x
z
r_{xz}
rxz,
r
y
z
r_{yz}
ryz,
r
x
y
r_{xy}
rxy 为简单相关系数,
x
x
x 和
y
y
y 被视为独立变量,
z
z
z 为依赖变量。
We also define the
multiple
coefficient
of
determination
\textbf{multiple coefficient of determination}
multiple coefficient of determination to be the square of the multiple correlation coefficient.
定义2: The
adjusted
\textbf{adjusted}
adjusted multiple coefficient of determination is
(2)
R
a
d
j
2
=
1
−
(
1
−
R
2
)
(
n
−
1
)
n
−
k
−
1
R_{adj}^2 = 1-\frac{(1-R^2)(n-1)}{n-k-1}\tag{2}
Radj2=1−n−k−1(1−R2)(n−1)(2)
其中
k
k
k 为独立变量的个数,
n
n
n 为数据长度。
定义2: the
partial
correlation
\textbf{partial correlation}
partial correlation (偏相关) of
x
x
x and
z
z
z holding
y
y
y constant is defined as follows:
(3)
r
z
x
,
y
=
r
x
z
−
r
y
z
r
x
y
1
−
r
y
z
2
1
−
r
x
y
2
r_{zx,y} = \frac{r_{xz}-r_{yz}r_{xy}}{\sqrt{1-r_{yz}^2}\sqrt{1-r_{xy}^2}}\tag{3}
rzx,y=1−ryz21−rxy2rxz−ryzrxy(3)
In the
semi-partial
correlation
\textbf{semi-partial correlation}
semi-partial correlation (半偏相关), the correlation between
x
x
x and
y
y
y is eliminated, but not the correlation between
x
x
x and
z
z
z and
y
y
y and
z
z
z:
(4)
r
z
(
x
,
y
)
=
r
x
z
−
r
y
z
r
x
y
1
−
r
x
y
2
r_{z(x,y)} = \frac{r_{xz}-r_{yz}r_{xy}}{\sqrt{1-r_{xy}^2}}\tag{4}
rz(x,y)=1−rxy2rxz−ryzrxy(4)
性质1:
r
z
(
x
,
y
)
2
=
R
z
,
x
y
2
−
r
y
z
2
r_{z(x,y)}^2 = R_{z,xy}^2-r_{yz}^2
rz(x,y)2=Rz,xy2−ryz2.
Proof:
(5)
R
z
,
x
y
2
−
r
y
z
2
=
r
x
z
2
+
r
y
z
2
−
2
r
x
z
r
y
z
r
x
y
1
−
r
x
y
2
−
r
y
z
2
=
r
x
z
2
+
r
y
z
2
−
2
r
x
z
r
y
z
r
x
y
−
r
y
z
2
(
1
−
r
x
y
2
)
1
−
r
x
y
2
=
r
x
z
2
+
r
y
z
2
r
x
y
2
−
2
r
x
z
r
y
z
r
x
y
1
−
r
x
y
2
=
(
r
x
z
−
r
y
z
r
x
y
)
2
1
−
r
x
y
2
=
r
z
(
x
,
y
)
2
\begin{aligned} R_{z,xy}^2-r_{yz}^2 = & \frac{r_{xz}^2+r_{yz}^2-2r_{xz}r_{yz}r_{xy}}{1-r_{xy}^2}-r_{yz}^2\\ = & \frac{r_{xz}^2+r_{yz}^2-2r_{xz}r_{yz}r_{xy}-r_{yz}^2(1-r_{xy}^2)}{1-r_{xy}^2}\\ = & \frac{r_{xz}^2+r_{yz}^2r_{xy}^2-2r_{xz}r_{yz}r_{xy}}{1-r_{xy}^2}\\ = & \frac{(r_{xz}-r_{yz}r_{xy})^2}{1-r_{xy}^2}\\ = & r_{z(x,y)}^2\tag{5} \end{aligned}
Rz,xy2−ryz2=====1−rxy2rxz2+ryz2−2rxzryzrxy−ryz21−rxy2rxz2+ryz2−2rxzryzrxy−ryz2(1−rxy2)1−rxy2rxz2+ryz2rxy2−2rxzryzrxy1−rxy2(rxz−ryzrxy)2rz(x,y)2(5)
性质2:
r
z
x
,
y
2
=
r
z
(
x
y
)
2
1
−
r
y
z
2
r_{zx,y}^2 = \frac{r_{z(xy)}^2}{1-r_{yz}^2}
rzx,y2=1−ryz2rz(xy)2.
Proof:
(6)
r
z
x
,
y
2
(
1
−
r
y
z
2
)
=
(
r
x
z
−
r
y
z
r
x
y
)
2
(
1
−
r
y
z
2
)
(
1
−
r
y
z
2
)
(
1
−
r
x
y
2
)
=
(
r
x
z
−
r
y
z
r
x
y
)
2
1
−
r
x
y
2
=
r
z
(
x
y
)
2
r_{zx,y}^2(1-r_{yz}^2) = \frac{(r_{xz}-r_{yz}r_{xy})^2(1-r_{yz}^2)}{(1-r_{yz}^2)(1-r_{xy}^2)}=\frac{(r_{xz}-r_{yz}r_{xy})^2}{1-r_{xy}^2}=r_{z(xy)}^2\tag{6}
rzx,y2(1−ryz2)=(1−ryz2)(1−rxy2)(rxz−ryzrxy)2(1−ryz2)=1−rxy2(rxz−ryzrxy)2=rz(xy)2(6)
性质3:
(7)
R
z
,
x
1
…
x
k
2
=
r
z
,
x
1
2
+
r
z
(
x
2
,
x
1
)
2
+
r
z
(
x
3
,
x
1
x
2
)
2
+
⋯
+
r
z
(
x
k
,
x
1
x
2
x
3
…
x
k
−
1
)
2
R_{z,x_1\dots x_k}^2 = r_{z,x_1}^2+r_{z(x_2,x_1)}^2+r_{z(x_3,x_1x_2)}^2+\dots+r_{z(x_k,x_1x_2x_3\dots x_{k-1})}^2\tag{7}
Rz,x1…xk2=rz,x12+rz(x2,x1)2+rz(x3,x1x2)2+⋯+rz(xk,x1x2x3…xk−1)2(7)
如果变量之间相互独立,则
(8)
R
z
,
x
1
…
x
k
2
=
r
z
x
1
2
+
r
z
x
2
2
+
⋯
+
r
z
x
k
2
R_{z,x_1\dots x_k}^2 =r_{zx_1}^2+r_{zx_2}^2+\dots+r_{zx_k}^2\tag{8}
Rz,x1…xk2=rzx12+rzx22+⋯+rzxk2(8)