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.5 (2 votes) Log in to vote

Bill Thurmes   Bill Thurmes - Show more from this author
MDCA
http://www.miyotadca.com

Share on Facebook Share on Twitter

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

  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.

 

Comments

Chad Calder   Chad Calder
Dec 29, 2018
Worked great! Thank you!
 

Log in to post comments.

 

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

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: