Learn R Programming

tectonicr (version 0.4.10)

uniform_scores_test: Uniform scores test

Description

q-sample uniform-scores test tests the equality of given distributions, i.e., whether samples of directions share the mean direction. The test is the distribution-free test of Mardia, Watson & Wheeler on the uniform scores \(2 \pi r_i / n\) of the ranks in the pooled sample.

Usage

uniform_scores_test(samples, alpha = 0.05, axial = TRUE)

Value

A list with class "htest"

Arguments

samples

list of samples of orientations

alpha

Significance level of the test ranging between 0 and 1. For dist = "vonmises" it must be one of 0.1, 0.05, 0.01 or 0 (only the tabulated p-value range is returned).

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

$$W = 2 \sum_{i=1}^q R_i^2 / n_i$$ with \(2(q - 1)\) degrees of freedom, \(R^* = 2 (n - 1) R_1^2 / (n_1 n_2)\) for two samples. Ties within a sample get consecutive ranks, ties between samples the average rank.

See Also

Other Two-Sample-Tests: ar_test(), equal_kappa_test(), walraff_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)
uniform_scores_test(list(x1, x2))

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

Run the code above in your browser using DataLab