circstat / pycircstat

Toolbox for circular statistics with Python
MIT License
157 stars 42 forks source link

circ_corr #72

Open philippberens opened 4 years ago

philippberens commented 4 years ago

Dear Philipp,

I used your circular statistics matlab package. Thank you for sharing it with the scientific community. I used the correlation coefficient (circ_corrcc) function to test some formulas I found in a paper under review.

In your function circ_corrcc(), the denominator of the correlation coefficient is defined as:

den = sqrt(sum(sin(alpha1 - alpha1_bar).^2) .* sum(sin(alpha2 - alpha2_bar).^2))

But looking at p. 176 of "Topics in Circular Statistics" and also in your paper "CircStat: A MATLAB Toolbox for Circular Statistics"

the formula for the denominator is:

sqrt(sum(sin(alpha1 - alpha1_bar).^2 .* sin(alpha2 - alpha2_bar).^2))

which is quite different as it is the sum of the element by element products of the sin().^2, instead of the product of the sums of the sin().^2.

I also found in thes paper "A correlation coefficient for angular variables" (January 1988, Sreenivasa Rao Jammalamadaka and Y.Ramakrishna Sarma), eq. 2.6, the same formula used in the matlab function provided by you.

I wonder which one is correct. Could you please have a look?

I look forward to hearing from you regards Francesco

--


Francesco De Biasio Consiglio Nazionale delle Ricerche Istituto di Scienze Polari c/o Campus Scientifico Ca' Foscari Via Torino, 155, 30170 Mestre, Venezia VE e-mail: francesco.debiasio@cnr.it tel.: +39 041 234 6761