Correlation Coefficient Calculation Module
Category:Dates and Math
Version Compatibility: Visual Basic 6
'Syntax: 'CorrelationCoefficient(RawData, column X, Column Y, code for weightfactor ' ' weightfactor 0: equal ' 1: 1/x ' 2: 1/x^2 ' 3: 1/y ' 4: 1/y^2 'To be called: ' 'r=CorrelationCoefficient(RawData) ' 'calculates the correlation coefficient from RawData(n,0) against RawData(n,1) 'with equal weightfactors 'r=CorrelationCoefficient(RawData, 1, 3, 4) 'calculates the correlation coefficient from RawData(n,1) against RawData(n,3) 'with 1/y^2 as weightfactorsA Word document explaining the math behind correlation coefficients, is 'part of the package'.
Instructions: Click the link below to download the code. Select 'Save' from the IE popup dialog. Once downloaded, open the .zip file from your local drive using WinZip or a comparable program to view the contents.