| sph_stat_Rayleigh | R Documentation | 
Low-level implementation of several statistics for assessing
uniformity on the (hyper)sphere
S^{p-1}:=\{{\bf x}\in R^p:||{\bf x}||=1\}, p\ge 2.
sph_stat_Rayleigh(X)
sph_stat_Bingham(X)
sph_stat_Ajne(X, Psi_in_X = FALSE)
sph_stat_Gine_Gn(X, Psi_in_X = FALSE, p = 0L)
sph_stat_Gine_Fn(X, Psi_in_X = FALSE, p = 0L)
sph_stat_Pycke(X, Psi_in_X = FALSE, p = 0L)
sph_stat_Bakshaev(X, Psi_in_X = FALSE, p = 0L)
sph_stat_Riesz(X, Psi_in_X = FALSE, p = 0L, s = 1)
sph_stat_PCvM(X, Psi_in_X = FALSE, p = 0L, N = 160L, L = 1000L)
sph_stat_PRt(X, Psi_in_X = FALSE, p = 0L, t = 1/3, N = 160L,
  L = 1000L)
sph_stat_PAD(X, Psi_in_X = FALSE, p = 0L, N = 160L, L = 1000L)
sph_stat_Poisson(X, Psi_in_X = FALSE, p = 0L, rho = 0.5)
sph_stat_Softmax(X, Psi_in_X = FALSE, p = 0L, kappa = 1)
sph_stat_Stereo(X, Psi_in_X = FALSE, p = 0L, a = 0)
sph_stat_CCF09(X, dirs, K_CCF09 = 25L, original = FALSE)
sph_stat_Rayleigh_HD(X)
sph_stat_CJ12(X, Psi_in_X = FALSE, p = 0L, regime = 3L)
X | 
 an array of size   | 
Psi_in_X | 
 does   | 
p | 
 integer giving the dimension of the ambient space   | 
s | 
 
  | 
N | 
 number of points used in the
Gauss-Legendre quadrature. Defaults to
  | 
L | 
 number of discretization points to interpolate angular functions
that require evaluating an integral. Defaults to   | 
t | 
 
  | 
rho | 
 
  | 
kappa | 
 
  | 
a | 
 either: 
  | 
dirs | 
 a matrix of size   | 
K_CCF09 | 
 integer giving the truncation of the series present in the
asymptotic distribution of the Kolmogorov-Smirnov statistic. Defaults to
  | 
original | 
 return the CCF09 statistic as originally defined?
If   | 
regime | 
 type of asymptotic regime for the CJ12 test, either   | 
Detailed descriptions and references of the statistics are available in García-Portugués and Verdebout (2018).
The Pycke and CJ12 statistics employ the scalar products matrix,
rather than the shortest angles matrix, when Psi_in_X = TRUE. This
matrix is obtained by setting scalar_prod = TRUE in
Psi_mat.
A matrix of size c(M, 1) containing the statistics for each
of the M samples.
Be careful on avoiding the next bad usages of the functions, which will produce spurious results:
 The directions in X do not have unit norm.
X does not contain Psi_mat(X) when
X_in_Theta = TRUE.
 The parameter p does not match with the dimension of
R^p.
Not passing the scalar products matrix to sph_stat_CJ12
when Psi_in_X = TRUE.
 The directions in dirs do not have unit norm.
García-Portugués, E. and Verdebout, T. (2018) An overview of uniformity tests on the hypersphere. arXiv:1804.00286. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.48550/arXiv.1804.00286")}.
## Sample uniform spherical data
M <- 2
n <- 100
p <- 3
set.seed(123456789)
X <- r_unif_sph(n = n, p = p, M = M)
## Sobolev tests
# Rayleigh
sph_stat_Rayleigh(X)
# Bingham
sph_stat_Bingham(X)
# Ajne
Psi <- Psi_mat(X)
dim(Psi) <- c(dim(Psi), 1)
sph_stat_Ajne(X)
sph_stat_Ajne(Psi, Psi_in_X = TRUE)
# Gine Gn
sph_stat_Gine_Gn(X)
sph_stat_Gine_Gn(Psi, Psi_in_X = TRUE, p = p)
# Gine Fn
sph_stat_Gine_Fn(X)
sph_stat_Gine_Fn(Psi, Psi_in_X = TRUE, p = p)
# Pycke
sph_stat_Pycke(X)
sph_stat_Pycke(Psi, Psi_in_X = TRUE, p = p)
# Bakshaev
sph_stat_Bakshaev(X)
sph_stat_Bakshaev(Psi, Psi_in_X = TRUE, p = p)
# Riesz
sph_stat_Riesz(X, s = 1)
sph_stat_Riesz(Psi, Psi_in_X = TRUE, p = p, s = 1)
# Projected Cramér-von Mises
sph_stat_PCvM(X)
sph_stat_PCvM(Psi, Psi_in_X = TRUE, p = p)
# Projected Rothman
sph_stat_PRt(X)
sph_stat_PRt(Psi, Psi_in_X = TRUE, p = p)
# Projected Anderson-Darling
sph_stat_PAD(X)
sph_stat_PAD(Psi, Psi_in_X = TRUE, p = p)
## Other tests
# CCF09
dirs <- r_unif_sph(n = 3, p = p, M = 1)[, , 1]
sph_stat_CCF09(X, dirs = dirs)
## High-dimensional tests
# Rayleigh HD-Standardized
sph_stat_Rayleigh_HD(X)
# CJ12
sph_stat_CJ12(X, regime = 1)
sph_stat_CJ12(Psi, regime = 1, Psi_in_X = TRUE, p = p)
sph_stat_CJ12(X, regime = 2)
sph_stat_CJ12(Psi, regime = 2, Psi_in_X = TRUE, p = p)
sph_stat_CJ12(X, regime = 3)
sph_stat_CJ12(Psi, regime = 3, Psi_in_X = TRUE, p = p)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.