Circular statistics in IDL [message #93981] |
Tue, 13 December 2016 01:20  |
Gadi Goelman
Messages: 3 Registered: December 2016
|
Junior Member |
|
|
Does any one know if there is a circular statistics tool in IDL similar to the CircStat in Matlab? or any other tool to work with complex numbers
Thanks
Gadi
|
|
|
|
Re: Circular statistics in IDL [message #94012 is a reply to message #93984] |
Tue, 20 December 2016 08:05   |
Gadi Goelman
Messages: 3 Registered: December 2016
|
Junior Member |
|
|
On Tuesday, December 13, 2016 at 6:10:30 PM UTC+2, Dick Jackson wrote:
> On Tuesday, 13 December 2016 01:20:14 UTC-8, Gadi Goelman wrote:
>> Does any one know if there is a circular statistics tool in IDL similar to the CircStat in Matlab? or any other tool to work with complex numbers
>>
>> Thanks
>>
>> Gadi
>
> Hi Gadi,
>
> I haven't seen an IDL library available, but when I needed some circular statistics (a.k.a. directional statistics) I wrote that up myself. What I did computed the mean, variance and standard deviation.
>
> The CircStat library certainly is comprehensive:
> https://github.com/circstat/circstat-matlab
>
> How much of that functionality do you think you will need?
>
> Cheers,
> -Dick
>
> Dick Jackson Software Consulting Inc.
> Victoria, BC, Canada --- http://www.d-jackson.com
Thanks Dick
What I need is to calculate significance of complex numbers or phases. Do you know if correct calculations of mean, variance etc is sufficient? I guess that you cant assume normal distributions and different distributions are needed such circular Gaussian.
Best,
Gadi
|
|
|
Re: Circular statistics in IDL [message #94019 is a reply to message #94012] |
Wed, 21 December 2016 09:25   |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
On Tuesday, December 20, 2016 at 11:05:03 AM UTC-5, Gadi Goelman wrote:
> On Tuesday, December 13, 2016 at 6:10:30 PM UTC+2, Dick Jackson wrote:
>> On Tuesday, 13 December 2016 01:20:14 UTC-8, Gadi Goelman wrote:
>>> Does any one know if there is a circular statistics tool in IDL similar to the CircStat in Matlab? or any other tool to work with complex numbers
>>>
>>> Thanks
>>>
>>> Gadi
>>
>> Hi Gadi,
>>
>> I haven't seen an IDL library available, but when I needed some circular statistics (a.k.a. directional statistics) I wrote that up myself. What I did computed the mean, variance and standard deviation.
>>
>> The CircStat library certainly is comprehensive:
>> https://github.com/circstat/circstat-matlab
>>
>> How much of that functionality do you think you will need?
>>
>> Cheers,
>> -Dick
>>
>> Dick Jackson Software Consulting Inc.
>> Victoria, BC, Canada --- http://www.d-jackson.com
>
> Thanks Dick
> What I need is to calculate significance of complex numbers or phases. Do you know if correct calculations of mean, variance etc is sufficient? I guess that you cant assume normal distributions and different distributions are needed such circular Gaussian.
I'm a big fan of the Rayleigh (Z) statistic. It's pretty easy to calculate. For an array of unit complex number U, it's
Z = total(abs(U)^2)
In the case of the null hypothesis (only noise), the Z statistic is distributed as a chi-square with 2 degrees of freedom. You you can use IDL's chi-square statistic to test statistical significance, or my equivalent MPCHITEST() function.
Craig
|
|
|
Re: Circular statistics in IDL [message #94035 is a reply to message #94019] |
Thu, 29 December 2016 17:16  |
Dick Jackson
Messages: 347 Registered: August 1998
|
Senior Member |
|
|
On Wednesday, 21 December 2016 09:25:04 UTC-8, Craig Markwardt wrote:
> On Tuesday, December 20, 2016 at 11:05:03 AM UTC-5, Gadi Goelman wrote:
>> What I need is to calculate significance of complex numbers or phases. Do you know if correct calculations of mean, variance etc is sufficient? I guess that you cant assume normal distributions and different distributions are needed such circular Gaussian.
>
> I'm a big fan of the Rayleigh (Z) statistic. It's pretty easy to calculate. For an array of unit complex number U, it's
>
> Z = total(abs(U)^2)
>
> In the case of the null hypothesis (only noise), the Z statistic is distributed as a chi-square with 2 degrees of freedom. You you can use IDL's chi-square statistic to test statistical significance, or my equivalent MPCHITEST() function.
>
> Craig
In general, I trust anything Craig says :-), and other sources point in the same direction:
https://en.wikipedia.org/wiki/Directional_statistics#Goodnes s_of_fit_and_significance_testing
Some MATLAB functions written for this seem to follow this:
https://github.com/circstat/circstat-matlab/blob/master/circ _r.m
https://github.com/circstat/circstat-matlab/blob/master/circ _rtest.m
I hope this is helpful!
Cheers,
-Dick
Dick Jackson Software Consulting Inc.
Victoria, BC, Canada --- http://www.d-jackson.com
|
|
|