
5 Data Analysis
of the variables to normalize values between +1 and –1. The results are
correlation coefficients, computed by the MATLAB
corrcoef function:
R12 = corrcoef([c1 c2])
R12 =
1.0000 0.9331
0.9331 1.0000
r12 = R12(1,2) % Correlation coefficient
r12 =
0.9331
r12sq = r12^2 % Coeffi cient of determination
r12sq =
0.8707
Because it is normalized, the value of the correlation coefficient is readily
comparable to values for other pairs of intersections. Its square, the coefficient
of determination, is the variance about the least-squares line divided by the
variance about the m ean. That is, it is the proportion of variation in the
response (in this case, the traffic volume at intersection 2) that is eliminated
or non-causally “explained” by a least-squares line through the scatter.
3-D Scatter Plots
A 3 -D scatter plot, created with the MATLAB scatter3 function, shows the
relationship between the traffic volume at all three intersections:
figure
scatter3(c1,c2,c3,'filled')
xlabel('Intersection 1')
ylabel('Intersection 2')
zlabel('Intersection 3')
5-16
Comentarios a estos manuales