Test whether groups share the same mean direction (Watson-Williams)
Source:R/circular_statistics.R
test_mean_directions.RdWraps watson.williams.test – the circular analogue
of the parametric F-test for equal means. Assumes von Mises-
distributed data with equal concentrations across groups; if concentrations
differ substantially or the distribution is non-von-Mises, consider a
non-parametric alternative.
Usage
test_mean_directions(
hd,
group_col,
angle_col = "heading",
pairwise = FALSE,
p_adjust = "none"
)Arguments
- hd
Data frame with heading and group columns.
- group_col
Column identifying conditions or groups.
- angle_col
Heading column in radians. Default
"heading".- pairwise
Logical.
FALSE(default) returns a single omnibus test across all groups.TRUEreturns all pairwise comparisons.- p_adjust
Multiple-comparison correction method passed to
p.adjust. Default"none". Applies only to the pairwise output; ap_value_adjcolumn is added. Strongly recommended whenpairwise = TRUE: use"BH"(Benjamini-Hochberg) or"holm"(family-wise control). Ignored for the omnibus test (single p-value, no adjustment needed).