The algorithm is as follows:
The algorithm will create pairs of elements of the vector x
.
It will calculate the circular mean on those pairs.
It will calculate the circular median on these averages.
The type of pairs considered are controlled by method
:
if method
is "HL1" are considered unordered pairs without
replications and repetition in the number of (n*(n-1))/2
pairs;
if method
is "HL2" are considered unordered pairs without
replications in the number of (n*(n+1))/2
pairs;
if method
is "HL3" all pairs are considered in the number of n^2
.
If prop
is not NULL
, the algorithm will consider a
subsample following the rules specified by method
, however, the
number of pairs considered is prop * (number of pairs defined by method
).
For more details see Bennett Sango Otieno, 'An Alternative Estimate of
Preferred Direction for Circular Data', Virginia Tech (2002) pag. 27-28 and 46-47.