Learn R Programming

tectonicr (version 0.4.10)

walraff_test: Wallraff Test of Angular Distances

Description

Performs the Wallraff test of angular distances or angular dispersion around the mean.

Usage

walraff_test(samples, ref = NULL, axial = TRUE)

Value

A list with class "htest" containing the following components:

statistic

the chi-squared statistic from kruskal.test.

parameter

the degrees of freedom for the chi-squared statistic.

p.value

the p-value for the test.

method

a character string containing the name of the test.

data.name

a character string giving the name(s) of the data.

Arguments

samples

list of samples of orientations

ref

a vector of angles (in degrees) used as reference to compute the angular distances from, in each group. It should contain either one element (a common reference for all groups) or as many elements as there are groups, in the same order as the elements of the list samples.

If ref is NULL (the default), the mean angle of each group will be used as reference. In this situation, the Wallraff test becomes a comparison of angular dispersion around the mean

axial

logical. Whether the data are axial, i.e. \(\pi\)-periodical (TRUE, the default) or directional, i.e. \(2 \pi\)-periodical (FALSE). In case of axial data, the angles will be doubled for the test.

Details

The Wallraff test of angular distances between two or more groups is performed and the results are printed. The null hypothesis is that distances are equal across groups.

The test proceeds by computing the angular distances from a reference angle, in each group. The angular distance between two angles is the circular range. Then the distances are compared with a usual rank sum test (Kruskal-Wallis, stats::kruskal.test). When there are only two groups, the Wilcoxon-Mann-Whitney test could be used but stats::wilcox.test without continuity correction for the p-value is equivalent to stats::kruskal.test so only stats::kruskal.test is used here.

The Wallraff test is most frequently used to compare angular dispersion around the mean, between samples. In this case, the reference angle is the mean angle of each sample. This is the default here, when no reference angles are provided.

References

Batschelet, E (1981). Circular Statistics in Biology. chap. 6.10, p. 124

Zar, J H (2010). Biostatistical analysis. sec. 27.7-8, p. 643

See Also

Other Two-Sample-Tests: ar_test(), equal_kappa_test(), uniform_scores_test(), watson_two_sample, watson_wheeler_test_perm(), watson_williams_test()

Examples

Run this code
set.seed(20250411)
x1 <- c(35, 45, 50, 55, 60, 70, 85, 95, 105, 120)
x2 <- c(75, 80, 90, 100, 110, 130, 135, 140, 150, 160, 165)
walraff_test(list(x1, x2))

x1 <- rvm(100, mean = 90, kappa = 20)
x2 <- rvm(100, mean = 90, kappa = 10)
x3 <- rvm(100, mean = 90, kappa = 1)
walraff_test(list(x1, x2, x3))

# San Andreas Fault Data:
data(san_andreas)
data("nuvel1")
PoR <- subset(nuvel1, nuvel1$plate.rot == "na")
sa.por <- PoR_shmax(san_andreas, PoR, "right")
walraff_test(list(sa.por$azi.PoR, rvm(100, 135, 10)))

Run the code above in your browser using DataLab