Home > atmlab > circular > circ_symtest.m

circ_symtest

PURPOSE ^

SYNOPSIS ^

function pval = circ_symtest(alpha)

DESCRIPTION ^

 [pval, z] = circ_symtest(alpha,w)
   Tests for symmetry about the median.
   H0: the population is symmetrical around the median
   HA: the population is not symmetrical around the median

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

circ_symtest.m

SOURCE CODE ^

0001 function pval = circ_symtest(alpha)
0002 %
0003 % [pval, z] = circ_symtest(alpha,w)
0004 %   Tests for symmetry about the median.
0005 %   H0: the population is symmetrical around the median
0006 %   HA: the population is not symmetrical around the median
0007 
0008 %
0009 %   Input:
0010 %     alpha    sample of angles in radians
0011 %
0012 %   Output:
0013 %     pval  p-value
0014 %
0015 % PHB 3/19/2009
0016 %
0017 % References:
0018 %   Biostatistical Analysis, J. H. Zar, 27.4
0019 %
0020 % Circular Statistics Toolbox for Matlab
0021 
0022 % By Philipp Berens, 2009
0023 % berens@tuebingen.mpg.de - www.kyb.mpg.de/~berens/circStat.html
0024 
0025 if size(alpha,2) > size(alpha,1)
0026     alpha = alpha';
0027 end
0028 
0029 % compute median
0030 md = circ_median(alpha);
0031 
0032 % compute deviations from median
0033 d = circ_dist(alpha,md);
0034 
0035 % compute wilcoxon sign rank test
0036 pval = signrank(d);
0037 
0038 
0039 
0040

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005