M_CORRELATE
Syntax | Return Value | Arguments | Keywords | Example | Version History | See Also
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.
Syntax
Result = M_CORRELATE( X, Y [, /DOUBLE] )
Return Value
Returns the single or double-precision multiple correlation coefficient.
Arguments
X
An integer, single-, or double-precision floating-point array of m-columns and n-rows that specifies the independent variable data. The columns of this two dimensional array correspond to the n-element vectors of independent variable data.
Y
An n-element integer, single-, or double-precision floating-point vector that specifies the dependent variable data.
Keywords
DOUBLE
Set this keyword to force the computation to be done in double-precision arithmetic.
Example
First, define the independent (X) and dependent (Y) data.
Next, compute the multiple correlations of Y.
IDL prints:
Multiple correlation of Y on 1st column of X: 0.798816 Multiple correlation of Y on 1st two columns of X: 0.875872 Multiple correlation of Y on all columns of X: 0.877196
Version History
See Also
A_CORRELATE, CORRELATE, C_CORRELATE, P_CORRELATE, R_CORRELATE, Correlation Analysis (Using IDL)