The M_CORRELATE function computes the multiple correlation coefficient of a dependent variable and two or more independent variables.
This routine is written in the IDL language. Its source code can be found in the file
m_correlate.pro
in the
lib
subdirectory of the IDL distribution.
Define the independent (X) and dependent (Y) data.
Y = [97.682, 98.424, 101.435, 102.266, 97.067, 97.397, $
99.481, 99.613, 96.901, 100.152, 98.797, 100.796, $
98.750, 97.991, 100.007, 98.615, 100.225, 98.388, $
Compute the multiple correlation of Y on the first column of X. The result should be 0.798816.
Compute the multiple correlation of Y on the first two columns of X. The result should be 0.875872.
PRINT, M_CORRELATE(X[0:1,*], Y)
Compute the multiple correlation of Y on all columns of X. The result should be 0.877197.
A_CORRELATE , CORRELATE , C_CORRELATE , P_CORRELATE , R_CORRELATE