Brian Dunning's FileMaker Custom Functions

ValCorrelationCoeff ( XValueList ; YValueList ; Xmean ; Ymean ; XStdDev ; YStdDev )

calculates the correlation coefficient for a least-squares fit

  Average rating: 4.0 (1 vote) Log in to vote

Bill Thurmes   Bill Thurmes

Share on Facebook Share on Twitter

  Sample input:
ValCorrelationCoeff ( "3¶3¶6" ; "2¶3¶4" ; 4 ; 3 ; 1.73 ; 1 )
  Sample output:

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

I've uploaded a function that calculates the slope of the best-fit line through a set of X,Y paired data, but how well does that line fit the data? This calculates the correlation coefficient for that least-squares fitted line. The result will be between -1 and 1 inclusive, with numbers close to 1 indicating a good fit to a positively sloped line, numbers near -1 indicating a good fit to a negatively sloped line, and number near 0 indicating a poor fit.



Log in to post comments.


Note: these functions are not guaranteed or supported by Please contact the individual developer with any questions or problems.

Under construction. Email me your wish list for improvements.