|
|
|
|
- Calculating the coefficient of correlation
StatCorrelation (Example)
Calculating the coefficient of correlation The following code is used to calculate the coefficient of correlation between row 3 and row 5 of a matrix. We assume that the matrix is already created and initialized. // -- Click code on BTN_CorrelationCoef // Declare the variables ResCorrelationCoef is real // Coefficient of correlation between row 3 and row 5 of the matrix ResCorrelationCoef = StatCorrelation("MyMatrix", 3, 5, False) // Display the coefficient IF ResCorrelationCoef <> 0 THEN Info("The correlation coefficient is: " + ResCorrelationCoef) ELSE // Error while calculating the correlation coefficient? IF StatError() <> 0 THEN Info("The correlation coefficient is null") ELSE // Display the error message Error(ErrorInfo(errMessage)) END END
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|