forked from circstat/circstat-matlab
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcirc_symtest.m
More file actions
36 lines (31 loc) · 777 Bytes
/
Copy pathcirc_symtest.m
File metadata and controls
36 lines (31 loc) · 777 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
function pval = circ_symtest(alpha)
% pval = circ_symtest(alpha)
% Tests for symmetry about the median.
% H0: the population is symmetrical around the median
% HA: the population is not symmetrical around the median
%
%
% Input:
% alpha sample of angles in radians
%
% Output:
% pval p-value
%
% PHB 3/19/2009
%
% References:
% Biostatistical Analysis, J. H. Zar, 27.4
%
% Circular Statistics Toolbox for Matlab
% By Philipp Berens, 2009
% berens@tuebingen.mpg.de - www.kyb.mpg.de/~berens/circStat.html
if size(alpha,2) > size(alpha,1)
alpha = alpha';
end
% compute median
md = circ_median(alpha);
% compute deviations from median
d = circ_dist(alpha,md);
% compute wilcoxon sign rank test
pval = signrank(d);
end