Skip to contents

Weighted version of the Rayleigh test (or V0-test) for uniformity against a distribution with a priori expected von Mises concentration.

Usage

weighted_rayleigh(x, prd = NULL, unc, axial = TRUE)

Arguments

x

numeric vector. Values in degrees

prd

The a priori expected direction (in degrees) for the alternative hypothesis.

unc

numeric. The standard deviations of x. If NULL, the non-weighted Rayleigh test is performed.

axial

logical. Whether the data are axial, i.e. \(\pi\)-periodical (TRUE, the default) or directional, i.e. \(2 \pi\)-periodical (FALSE).

Value

a list with the components:

statistic

Test statistic

p.value

significance level of the test statistic

Details

The Null hypothesis is uniformity (randomness). The alternative is a distribution with a specified mean direction (prd). If statistic > p.value, the null hypothesis is rejected. If not, the alternative cannot be excluded.

See also

Examples

# Load data
data("cpm_models")
data(san_andreas)
PoR <- equivalent_rotation(subset(cpm_models, model == "NNR-MORVEL56"), "na", "pa")
sa.por <- PoR_shmax(san_andreas, PoR, "right")
data("iceland")
PoR.ice <- equivalent_rotation(subset(cpm_models, model == "NNR-MORVEL56"), "eu", "na")
ice.por <- PoR_shmax(iceland, PoR.ice, "out")
data("tibet")
PoR.tib <- equivalent_rotation(subset(cpm_models, model == "NNR-MORVEL56"), "eu", "in")
tibet.por <- PoR_shmax(tibet, PoR.tib, "in")

# GOF test:
weighted_rayleigh(tibet.por$azi.PoR, prd = 90, unc = tibet$unc)
#> Reject Null Hypothesis
#> $statistic
#> [1] 0.5409346
#> 
#> $p.value
#> [1] 3.802812e-08
#> 
weighted_rayleigh(ice.por$azi.PoR, prd = 0, unc = iceland$unc)
#> Reject Null Hypothesis
#> $statistic
#> [1] 0.4162169
#> 
#> $p.value
#> [1] 0.0007121859
#> 
weighted_rayleigh(sa.por$azi.PoR, prd = 135, unc = san_andreas$unc)
#> Reject Null Hypothesis
#> $statistic
#> [1] 0.8046196
#> 
#> $p.value
#> [1] 2.491718e-47
#>