WOLFRAM|DEMONSTRATIONS PROJECT

Hidden Correlation in Regression

​
display
coefficients
dependency
Poincaré
correlation
sample size
20
50
100
200
r
5
random seed
495
This Demonstration simulates the linear regression
y
i
=
β
0
+
β
1
x
i
+
e
i
,
i=1,…,n
, where
β
0
=
β
1
=0
,
e=(
e
1
,…,
e
n
)
, and the
x
i
are random independent variables from a continuous uniform distribution on
(0,n)
;
e
is generated from a multivariate normal distribution with mean vector 0 and covariance matrix
Ω=ω
h
i,j

, where
h
i,j
=
x
i
-
x
j

and
w(h)=exp(-h/r)
,
r≠0
. The thumbnail shows the Poincaré plot (or scatterplot) of the lagged reordered residuals

e
x
(i+1)
versus

e
x
(i)
from the linear model fit. The Kendall rank correlation and its two-sided
P
-value shown in the plot provide a diagnostic test for the presence of hidden correlation. From this residual plot, we clearly see that the errors violate the usual regression assumption of independence. This model misspecification is less obvious using the traditional residual dependency plot.