nntsuniformitytestlikelihoodratio: Computes the statistic and critical values of the circular...

View source: R/nntsuniformitytestlikelihoodratio.R

nntsuniformitytestlikelihoodratioR Documentation

Computes the statistic and critical values of the circular uniformity test

Description

Computes the statistic and critical values at 10%, 5% and 1% of the circular uniformity test based on the NNTS likelihood ratio for M values from 1 to 7 and any sample size.

Usage

nntsuniformitytestlikelihoodratio(data,M=1, iter=1000, initialpoint = FALSE,
cinitial,gradientstop=1e-10)

Arguments

data

Vector of angles in radians

M

Number of components in the NNTS

iter

Number of iterations

initialpoint

TRUE if an initial point for the optimization algorithm will be used

cinitial

Vector of size M+1. The first element is real and the next M elements are complex (values for c_0 and c_1, \ldots ,c_M). The sum of the squared moduli of the parameters must be equal to \frac{1}{2\pi}

.

gradientstop

The value of the gradient of the Newton algorithm at which the algorithms stops

Value

gradient

Gradient error after the last iteration

likratiounifstat

Value of the likelihood ratio NNTS circular uniformity test statistic

criticalvalue10percent

Critical value at a 10% significance level of the likelihood ratio NNTS circular uniformity test

criticalvalue05percent

Critical value at a 5% significance level of the likelihood ratio NNTS circular uniformity test

criticalvalue01percent

Critical value at a 1% significance level of the likelihood ratio NNTS circular uniformity test

Author(s)

Juan Jose Fernandez-Duran and Maria Mercedes Gregorio-Dominguez

References

Fernandez-Duran and J. J. and Gregorio-Dominguez and M. M (2022). Sums of Independent Circular Random Variables and Maximum Likelihood Circular Uniformity Tests Based on Nonnegative Trigonometric Sums Distributions, arXiv preprint arXiv:2212.01416

Examples

set.seed(200)
a<-2*pi*runif(50)
#NNTS likelihood ratio circular uniformity test for M=2 and gradientstop at 1e-09
nntsuniformitytestlikelihoodratio(data=a,M=2,gradientstop=1e-09)
data(Turtles_radians)
#NNTS likelihood ratio circular uniformity test for M=5 and gradientstop at 1e-12
nntsuniformitytestlikelihoodratio(data=Turtles_radians,M=5,gradientstop=1e-09)

CircNNTSR documentation built on Sept. 1, 2023, 9:07 a.m.