Rank: 111828 based on 0 downloads (last 30 days) and 0 file submitted
photo

Dillon

E-mail

Personal Profile:

 

Watch this Author's files

 

Comments and Ratings by Dillon
Updated File Comments Rating
26 Apr 2012 Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data. Author: Philipp Berens

Great toolbox but I think there is an error in the logic used at circ_wwtest.m -> checkAssumption() lines 107-115.

The code currently reads:
if n > 10 && rw<.45
warning('Test not applicable. Average resultant vector length < 0.45.') %#ok<WNTAG>
elseif n > 6 && rw<.5
warning('Test not applicable. Average number of samples per population < 11 and average resultant vector length < 0.5.') %#ok<WNTAG>
elseif n >=5 && rw<.55
warning('Test not applicable. Average number of samples per population < 7 and average resultant vector length < 0.55.') %#ok<WNTAG>
elseif n < 5
warning('Test not applicable. Average number of samples per population < 5.') %#ok<WNTAG>
end

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:
if n >= 11 && rw<.45
warning('Test not applicable. Average resultant vector length < 0.45.') %#ok<WNTAG>
elseif n<11 && n >= 7 && rw<.5
warning('Test not applicable. Average number of samples per population < 11 and average resultant vector length < 0.5.') %#ok<WNTAG>
elseif n<7 && n >=5 && rw<.55
warning('Test not applicable. Average number of samples per population < 7 and average resultant vector length < 0.55.') %#ok<WNTAG>
elseif n < 5
warning('Test not applicable. Average number of samples per population < 5.') %#ok<WNTAG>
end

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.

Contact us