Consider the following data for the illustration of the detection of heteroscedasticity using the Spearman Rank correlation test. The Data file is available to download.
Y | X2 | X3 |
---|---|---|
11 | 20 | 8.1 |
16 | 18 | 8.4 |
11 | 22 | 8.5 |
14 | 21 | 8.5 |
13 | 27 | 8.8 |
17 | 26 | 9 |
14 | 25 | 8.9 |
15 | 27 | 9.4 |
12 | 30 | 9.5 |
18 | 28 | 9.5 |
The estimated multiple linear regression model is:
$$Y_i = -34.936 -0.75X_{2i} + 7.611X_{3i}$$
The Residuals with the data table are:
Y | X2 | X3 | Residuals |
---|---|---|---|
11 | 20 | 8.1 | -0.63302 |
16 | 18 | 8.4 | 0.575564 |
11 | 22 | 8.5 | -2.16954 |
14 | 21 | 8.5 | 0.076455 |
13 | 27 | 8.8 | 1.317102 |
17 | 26 | 9 | 3.040825 |
14 | 25 | 8.9 | 0.047951 |
15 | 27 | 9.4 | -1.2497 |
12 | 30 | 9.5 | -2.74881 |
18 | 28 | 9.5 | 1.743171 |
We need to find the rank of absolute values of $u_i$ and the expected heteroscedastic variable $X_2$.
$Y$ | $X_2$ | $X_3$ | Residuals | Rank of |$u_i$| | Rank of $X_2$ | $d$ | $d^2$ | |
---|---|---|---|---|---|---|---|---|
11 | 20 | 8.1 | -0.633 | 4 | 2 | 2 | 4 | |
16 | 18 | 8.4 | 0.576 | 3 | 1 | 2 | 4 | |
11 | 22 | 8.5 | -2.170 | 8 | 4 | 4 | 16 | |
14 | 21 | 8.5 | 0.076 | 2 | 3 | -1 | 1 | |
13 | 27 | 8.8 | 1.317 | 6 | 7.5 | -1.5 | 2.25 | |
17 | 26 | 9 | 3.041 | 10 | 6 | 4 | 16 | |
14 | 25 | 8.9 | 0.048 | 1 | 5 | -4 | 16 | |
15 | 27 | 9.4 | -1.250 | 5 | 7.5 | -2.5 | 6.25 | |
12 | 30 | 9.5 | -2.749 | 9 | 10 | -1 | 1 | |
18 | 28 | 9.5 | 1.743 | 7 | 9 | -2 | 4 | |
Total = | 0 | 70.5 |
Calculating the Spearman Rank correlation
\begin{align}
r_s&=1-\frac{6\sum d^2}{n(n-1)}\\
&=1-\frac{6\times 70.5)}{10(100-1)}=0.5727
\end{align}
Let us perform the statistical significance of $r_s$ by t-test
\begin{align}
t&=\frac{r_s \sqrt{n}}{\sqrt{1-r_s^2}}\\
&=\frac{0.5727\sqrt{8}}{\sqrt{1-(0.573)^2}}=1.977
\end{align}
The value of $t$ from the table at a 5% level of significance at 8 degrees of freedom is 2.306.
Since $t_{cal} \ngtr t_{tab}$, there is no evidence of the systematic relationship between the explanatory variables, $X_2$ and the absolute value of the residuals ($|u_i|$) and hence there is no evidence of heteroscedasticity.
Since there is more than one regressor (the example is from the multiple regression model), therefore, Spearman’s Rank Correlation test should be repeated for each of the explanatory variables.
As an assignment perform the Spearman Rank Correlation between |$u_i$| and $X_3$ for the data above. Test the statistical significance of the coefficient in the above manner to explore evidence about heteroscedasticity.
Read about Pearson’s Correlation Coefficient
n= 10 but this one n= 100 so this is mistake please update this value.
Thank you.
Thank you, Correction is made.