Date  File  Comment by  Comment  Rating 

04 Nov 2014  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Dave  This is a great toolbox. However, I have an issue with circ_corrcl, or perhaps I'm misunderstanding its proper use. When I feed it perfectly correlated data, I do not get rho=1: circ_corrcl(linspace(pi,pi,1000),linspace(0,10,1000))
I noticed this while trying to see if I could get a sign for the rho value (which is always positive by the definition in the function). Unfortunately, I don't have a copy of the Zar text available. 

07 Oct 2014  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  W. Owen Brimijoin  indispensable 

22 Sep 2014  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Ch. Lat.  you meant "circ_rtest Rayleigh's test for nonuniformity " this is not what you look for ? 

22 Sep 2014  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Ch. Lat.  @ Wasim Malik. I believe the toolbox fieldtrip has it, but their implementation is a bit more bothersome. 

01 Jun 2014  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Wasim Malik  On a quick look, the MooreRayleigh test for uniformity of vector data (B.R. Moore, Biometrika, 1980) does not seem to be available in this toolbox. Philipp, do you have any plans to implement it? Alternatively, does anyone know if a Matlab implementation of that test is available elsewhere? Thanks. 

01 Jun 2014  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Wasim Malik  
14 May 2014  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Diego  Hi everybody! I have a question about circ_plot.m; When I execute this code the angles appear from 0 to 360 degrees. I only want represent values from 0 to 180. How I can do it? Thanks in advance! 

09 Feb 2014  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Richard Edmonds  Actually, ignore the inverse_cdf function I have provided. It should generate a vlaue for kappa and it needs adjusting for values of thetahat other than zero. 

07 Feb 2014  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Richard Edmonds  Great submission. It would be nice to have cdf and inversion cdf for the vmpdf functions. Here's what I wrote for my needs
function theta = circ_vminv(p, thetahat, kappa)


05 Feb 2014  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Sepideh  Hi,


09 Oct 2013  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Pete  Thanks for the toolkit. Does anybody have a clue how to do multipleregression with circular data? 

26 Jul 2013  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  bbegginnerr  Hi everyone,


13 Jun 2013  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Philipp Berens  Mear  could you be more specific regarding your doubts about the wwtest? The negative values for circ_mean are a result of the way circ_mean is implemented. If you prefer them to be between 0 and 2pi, just edit the function to provide the data in that format. I'll update the von Mises function in a future release. 

10 Jun 2013  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Mear  Just a quick question concerning the circ_mean function: I usually get the results in negative values, despite all the input angles being in positive degrees (conv. to rads). It's hardly a big deal to translate this to [0,360] degrees, but it is a bit annoying and seems unneccesary. Is this how it should be? I'm also getting some results for the wwtest which seem very wrong to me (but make sense in light of the negative mean values), and it's making me question the accuracy of this toolbox. 

21 May 2013  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  sergio  Marc, thanks, you are right.
Then I use the kuiper test to see whether the two distribution x and vonmis differ significantly (the difference can be in any property, such as mean, location and dispersion):
However I was wondering if it is possible to have more accurate pvalue estimates in the Kuiper test, as already asked by another user before. 

18 May 2013  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  sergio  Dear Mark,
Anyway, circ_ktest is a parametric twosample test to determine whether two concentration parameters are different.
I do not understand how these tests could help me with a goodnessoffit test for the Von MisesFisher distribution, but probably is my limit. Could anyone being of any help? Regards, Sergio 

14 May 2013  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Marc  sergio  did you see the pdf with descriptions? (http://www.jstatsoft.org/v31/i10/paper) You probably want either the ktest of the kuipertest. 

13 May 2013  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  sergio  Hi guys, I'm new to circular statistics and I've downloaded this package. Given some vectors, I'd like to test if they are distributed following a Von MisesFisher distribution.


02 Apr 2013  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Aviram Gelblum  After some testing I figured the previous bug has to do with recurrence of unique values in the data. I took care of it by using
At any rate, I forgot to mention how great this toolbox is. It has been of great help, and saved me a lot of time and work. 

02 Apr 2013  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Aviram Gelblum  Hi, I'm getting wrong clustering using circ_clust.
I'm using Matlab 2012b... 

14 Feb 2013  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Dylan Muir  Great toolbox. I was wondering if it is possible to have more accurate pvalue estimates in the Kuiper test? 

11 Dec 2012  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Francesco Montorsi  Hi,
function [p alpha] = circ_vm_logpdf(alpha, thetahat, kappa) % if no angles are supplied, 100 evenly spaced points around the circle are
alpha = alpha(:); % evaluate pdf
Thanks to the greater numerical stability logpdfs are often used in place of pdfs, so this little function may be of help to others... 

06 Nov 2012  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Allan  Hi there, great toolbox. I propose a change to avoid numerical instability in circ_vmpdf.m.
C = 1/(2*pi*besseli(0,kappa));
Proposed replacement code:
Examples: circ_vmpdf(0,0,1000) Old code result: NaN


18 Sep 2012  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Philipp Berens  Ryan, the average is in the dot product w'*exp(...) which in the simplest case is a vector of ones  so this is the sum operation. exp(i*angle) decomposes the angle into its sine and cosine components. Finally, angle is atan2. Compare the results of your and my code  they should be identical with my code likely running a bit fast due to matrix style computations. Bst


16 Aug 2012  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Ryan  I haven't run through this toolbox yet, so I apologize if I am missing something with this question (I just glanced through the source code because I am interested in directional stats). When you calculate the mean, the formula you use is: % compute weighted sum of cos and sin of angles
% obtain mean by
Now, correct me if I'm wrong, but this doesn't seem to calculate the average at all? It seems to me that here we are inputting a data array into the angle command, which will output the phase angle of each element of that array, not a singular mean. Wouldn't a better way of calculating the average be to use atan2? Something like: for i = 1:w
X = sum(S)*(1/w);
mu = atan2(X,Y); 

15 Aug 2012  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Marnix Maas  Thanks for the great toolbox! I have a question: I have a set of directional stochastic variables that are mutually correlated. I have used circ_corrcc to construct a correlation matrix for these variables, but I’m also interested in their covariance matrix. There does not appear to be a function for this in the current toolbox. Not having any previous experience with circular statistics, I’m wondering if it makes sense to construct a covariance matrix by denormalizing the correlation matrix, multiplying each element by the two corresponding circular standard deviations? Perhaps a covariance matrix could be a useful addition to the toolbox. Thanks,


21 Jul 2012  Sampling from multivariate correlated binary and poisson random variables These Matlab functions can be used to generate multivariate correlated binary variables, and correl  Kozlov Sacha  OK, I see, it's a problem of Win64 MatLab: C compiler is not included, so you have to download it first (see "mex setup") and then compile your bivnor.c for this plateform ("mex bivnor.c"). 

18 Jul 2012  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Philipp Berens  Hi Francesco, if you have orientations, multiply all orientations by 2 to obtain directions. If you want to obtain the mean resultant vector, devide its orientation by 2 again. 

14 Jul 2012  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Francesco  excuse my previous post! I just realize what paxial truly meant. For further reference this will solve the previously cited problem %% uniform distribution test


14 Jul 2012  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Francesco  excuse my previous post! I just realize what paxial truly meant. For further reference this will solve the previously cited problem %% uniform distribution test


14 Jul 2012  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Francesco  I am testing the toolbox out with not much of a prior knowledge on the subject. It seems a really good piece of software and it's helping me out grasping some of the theory. I have a question: if I am dealing with orientations [0, 180) degrees more than directions [0 360), is there a proper way to transform may data prior to using the function in the toolbox? For example, if I am trying to test for circular uniformity with a population that is uniformly distributed in [0 180)  which I'd like to have a p>0.05  I obtained a very small value, which is consistent with the test looking over the full interval. Suggestions? Thanks
Example code 


27 Jun 2012  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Jer Walley  Great toolbox! Exactly what I needed. However, my data has many NaN's  do you have a way to work around data with gaps? 

30 May 2012  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Matt Davis  This is a great toolbox  very helpful. A few bug reports: 1. formatSubPlot calls "parseVarArgs" that's not standard matlab, or part of this toolbox. Could you add a pointer to where to download this. 2. In Example 2 the descriptive stats cell needs updating to respect the matrix style computations. So, line 67 should read: stats(i,1) = circ_mean(ori,spk,2); and similar for all the other lines of code. Thanks for supporting this toolbox.


16 May 2012  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Natalia  I confirm Dillon's report on circ_wwtest bug. 

26 Apr 2012  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Dillon  Great toolbox but I think there is an error in the logic used at circ_wwtest.m > checkAssumption() lines 107115. The code currently reads:
Notice that the if/else statements do not match the warning text. Particularly when n>5 the user will always be warned when the resultant vector, rw<0.55 which is not captured by the warning. The corrected if/else statements are as follows:
I've assumed that the warning statements are correct but if the if/else statements are correct it would be more compact to warn the user under only 2 conditions: n<5 and rw<0.55. Thanks again for the very useful toolbox. 

24 Apr 2012  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Philipp Berens  Thanks for the recent feedback and bugreports. I was away for a while and will start taking care of them soon. 

30 Mar 2012  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Omar Mian  Suggestion for addition:


16 Mar 2012  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Pablo Martinez  Sorry wrong line number. The error is at line 169!
Great toolbox. 

15 Mar 2012  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Pablo Martinez  Great toolbox! 

15 Mar 2012  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Pablo Martinez  I found an error in the function circ_hktest.m at line 160


01 Mar 2012  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Natalia  Thank you very much for such a useful toolbox. Now, I have a question related to circ_ktest (twosmple test to compare concentration). The F statistic is defined only in case of rbar>.7, Mardia (pag 133, 1999) compute F in the case where resultant vector length is <0.45 :
R1avg=circ_r(alpha1);
R1 = n1*circ_r(alpha1);
%make sure that rbar > .7
if rbar > .7 f = ((n21)*(n1R1))/((n11)*(n2R2)); elseif rbar< .45 %taken from Mardia 1999 p.133 (Baschelet report: Mardia 1972 pag 161)


11 Jan 2012  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Luke  Great tool.


08 Dec 2011  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Balazs Barkoczi  Thanks for this excellent toolbox!
example2:
Error in ==> example2 at 42


11 Nov 2011  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  FuhCherng  @Christopher: Thank you so much for your kindness and help. I really appreciate it. 

09 Nov 2011  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Christopher  @Fuh: indeed it should and when I step carefully through the function, sometimes the result comes out correct and sometimes it doesn't, somewhat dependent on the numbers in alpha. To fix the problem go to lines 45 and 46 of circ_median (ver 2011f). You see two inequalities, dd>=0 and dd<0. The two inequalities should be identical for consistency and the correct result. Edit line 46 to read:


09 Nov 2011  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  FuhCherng  I am new in circular statistics, so don't laugh at me... But I do have a question about the circ_median() function. Say I have a data set that contains six angles [0.1 0.2 0.3 0.4 0.5 0.6]. when I feed these data into circ_median(), the function returns a median = 0.4 I thought that, when a data set contains an even number of observations, the median would be calculated as the average of the middle two numbers (i.e., (0.3+0.4)/2 = 0.35). My code is listed below. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Can anyone help me with this? Sincerely,


28 Sep 2011  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Philipp Berens  Thanks for the comments. @Christopher: The ~ has been introduced as a placeholder in the latest MATLAB versions for output arguments that are not needed. I will go back to some dummy variable with the next upload. @Heida: I don't see an easy way of doing what you suggest with the functions implemented. @Omzaz: The multisample tests assume independent samples. I don't know about repeatedmeasures ANOVA etc. for circular data. If you find anything let me know. The option to ignore NaNs... I think this is a tricky thing, because you always make a specific choice how NaNs are treated and each user might have different preferences. I will think about it though. 

20 Sep 2011  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Omar Mian  Can any of the multisample tests in this toolbox be used with repeated measures data or do they all assume independent samples? 

30 Aug 2011  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Omar Mian  Very useful toolbox. Option to ignore NaNs in the calculations would make it even better. 

22 Aug 2011  Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data.  Vlad Atanasiu  Good toolbox! I added a function for kernel smoothing density estimate for circular data here: http://www.mathworks.com/matlabcentral/fileexchange/32614kernelsmoothingdensityestimateforcirculardata . 
