sph_stat_distr function

Asymptotic distributions for spherical uniformity statistics

Asymptotic distributions for spherical uniformity statistics

Computation of the asymptotic null distributions of spherical uniformity statistics.

p_sph_stat_Bingham(x, p) d_sph_stat_Bingham(x, p) p_sph_stat_CJ12(x, regime = 1L, beta = 0) d_sph_stat_CJ12(x, regime = 3L, beta = 0) p_sph_stat_Rayleigh(x, p) d_sph_stat_Rayleigh(x, p) p_sph_stat_Rayleigh_HD(x, p) d_sph_stat_Rayleigh_HD(x, p) p_sph_stat_Ajne(x, p, K_max = 1000, thre = 0, method = "I", ...) d_sph_stat_Ajne(x, p, K_max = 1000, thre = 0, method = "I", ...) p_sph_stat_Bakshaev(x, p, K_max = 1000, thre = 0, method = "I", ...) d_sph_stat_Bakshaev(x, p, K_max = 1000, thre = 0, method = "I", ...) p_sph_stat_Gine_Fn(x, p, K_max = 1000, thre = 0, method = "I", ...) d_sph_stat_Gine_Fn(x, p, K_max = 1000, thre = 0, method = "I", ...) p_sph_stat_Gine_Gn(x, p, K_max = 1000, thre = 0, method = "I", ...) d_sph_stat_Gine_Gn(x, p, K_max = 1000, thre = 0, method = "I", ...) p_sph_stat_PAD(x, p, K_max = 1000, thre = 0, method = "I", ...) d_sph_stat_PAD(x, p, K_max = 1000, thre = 0, method = "I", ...) p_sph_stat_PCvM(x, p, K_max = 1000, thre = 0, method = "I", ...) d_sph_stat_PCvM(x, p, K_max = 1000, thre = 0, method = "I", ...) p_sph_stat_Poisson(x, p, rho = 0.5, K_max = 1000, thre = 0, method = "I", ...) d_sph_stat_Poisson(x, p, rho = 0.5, K_max = 1000, thre = 0, method = "I", ...) p_sph_stat_PRt(x, p, t = 1/3, K_max = 1000, thre = 0, method = "I", ...) d_sph_stat_PRt(x, p, t = 1/3, K_max = 1000, thre = 0, method = "I", ...) p_sph_stat_Riesz(x, p, s = 1, K_max = 1000, thre = 0, method = "I", ...) d_sph_stat_Riesz(x, p, s = 1, K_max = 1000, thre = 0, method = "I", ...) p_sph_stat_Sobolev(x, p, vk2 = c(0, 0, 1), method = "I", ...) d_sph_stat_Sobolev(x, p, vk2 = c(0, 0, 1), method = "I", ...) p_sph_stat_Softmax(x, p, kappa = 1, K_max = 1000, thre = 0, method = "I", ...) d_sph_stat_Softmax(x, p, kappa = 1, K_max = 1000, thre = 0, method = "I", ...) p_sph_stat_Stereo(x, p, a = 0, K_max = 1000, method = "I", ...) d_sph_stat_Stereo(x, p, a = 0, K_max = 1000, method = "I", ...)

Arguments

  • x: a vector of size nx or a matrix of size c(nx, 1).

  • p: integer giving the dimension of the ambient space RpR^p that contains Sp1S^{p-1}.

  • regime: type of asymptotic regime for the CJ12 test, either 1

    (sub-exponential regime), 2 (exponential), or 3

    (super-exponential; default).

  • beta: β\beta parameter in the exponential regime of the CJ12 test, a non-negative real. Defaults to 0.

  • K_max: integer giving the truncation of the series that compute the asymptotic p-value of a Sobolev test. Defaults to 1e3.

  • thre: error threshold for the tail probability given by the the first terms of the truncated series of a Sobolev test. Defaults to 0 (no further truncation).

  • method: method for approximating the density, distribution, or quantile function of the weighted sum of chi squared random variables. Must be "I" (Imhof), "SW" (Satterthwaite--Welch), "HBE"

    (Hall--Buckley--Eagleson), or "MC" (Monte Carlo; only for distribution or quantile functions). Defaults to "I".

  • ...: further parameters passed to p_Sobolev or d_Sobolev (such as x_tail).

  • rho: ρ\rho parameter for the Poisson test, a real in [0,1)[0, 1). Defaults to 0.5.

  • t: tt parameter for the Rothman and Cressie tests, a real in (0,1)(0, 1). Defaults to 1 / 3.

  • s: ss parameter for the ss-Riesz test, a real in (0,2)(0, 2). Defaults to 1.

  • vk2: weights for the finite Sobolev test. A non-negative vector or matrix. Defaults to c(0, 0, 1).

  • kappa: κ\kappa parameter for the Softmax test, a non-negative real. Defaults to 1.

  • a: either:

    • an=a/na_n = a / n parameter used in the length of the arcs of the coverage-based tests. Must be positive. Defaults to 2 * pi.
    • aa parameter for the Stereo test, a real in [1,1][-1, 1]. Defaults to 0.

Returns

  • r_sph_stat_*: a matrix of size c(n, 1) containing the sample.
  • p_sph_stat_*, d_sph_stat_*: a matrix of size c(nx, 1) with the evaluation of the distribution or density functions at x.

Details

Descriptions and references on most of the asymptotic distributions are available in García-Portugués and Verdebout (2018).

Examples

# Ajne curve(d_sph_stat_Ajne(x, p = 3, method = "HBE"), n = 2e2, ylim = c(0, 4)) curve(p_sph_stat_Ajne(x, p = 3, method = "HBE"), n = 2e2, col = 2, add = TRUE) # Bakshaev curve(d_sph_stat_Bakshaev(x, p = 3, method = "HBE"), to = 5, n = 2e2, ylim = c(0, 2)) curve(p_sph_stat_Bakshaev(x, p = 3, method = "HBE"), n = 2e2, col = 2, add = TRUE) # Bingham curve(d_sph_stat_Bingham(x, p = 3), to = 20, n = 2e2, ylim = c(0, 1)) curve(p_sph_stat_Bingham(x, p = 3), n = 2e2, col = 2, add = TRUE) # CJ12 curve(d_sph_stat_CJ12(x, regime = 1), from = -10, to = 10, n = 2e2, ylim = c(0, 1)) curve(d_sph_stat_CJ12(x, regime = 2, beta = 0.1), n = 2e2, col = 2, add = TRUE) curve(d_sph_stat_CJ12(x, regime = 3), n = 2e2, col = 3, add = TRUE) curve(p_sph_stat_CJ12(x, regime = 1), n = 2e2, col = 1, add = TRUE) curve(p_sph_stat_CJ12(x, regime = 2, beta = 0.1), n = 2e2, col = 2, add = TRUE) curve(p_sph_stat_CJ12(x, regime = 3), col = 3, add = TRUE) # Gine Fn curve(d_sph_stat_Gine_Fn(x, p = 3, method = "HBE"), to = 2, n = 2e2, ylim = c(0, 2)) curve(p_sph_stat_Gine_Fn(x, p = 3, method = "HBE"), n = 2e2, col = 2, add = TRUE) # Gine Gn curve(d_sph_stat_Gine_Gn(x, p = 3, method = "HBE"), to = 1.5, n = 2e2, ylim = c(0, 2.5)) curve(p_sph_stat_Gine_Gn(x, p = 3, method = "HBE"), n = 2e2, col = 2, add = TRUE) # PAD curve(d_sph_stat_PAD(x, p = 3, method = "HBE"), to = 3, n = 2e2, ylim = c(0, 1.5)) curve(p_sph_stat_PAD(x, p = 3, method = "HBE"), n = 2e2, col = 2, add = TRUE) # PCvM curve(d_sph_stat_PCvM(x, p = 3, method = "HBE"), to = 0.6, n = 2e2, ylim = c(0, 7)) curve(p_sph_stat_PCvM(x, p = 3, method = "HBE"), n = 2e2, col = 2, add = TRUE) # Poisson curve(d_sph_stat_Poisson(x, p = 3, method = "HBE"), to = 2, n = 2e2, ylim = c(0, 2)) curve(p_sph_stat_Poisson(x, p = 3, method = "HBE"), n = 2e2, col = 2, add = TRUE) # PRt curve(d_sph_stat_PRt(x, p = 3, method = "HBE"), n = 2e2, ylim = c(0, 5)) curve(p_sph_stat_PRt(x, p = 3, method = "HBE"), n = 2e2, col = 2, add = TRUE) # Rayleigh curve(d_sph_stat_Rayleigh(x, p = 3), to = 15, n = 2e2, ylim = c(0, 1)) curve(p_sph_stat_Rayleigh(x, p = 3), n = 2e2, col = 2, add = TRUE) # HD-standardized Rayleigh curve(d_sph_stat_Rayleigh_HD(x, p = 3), from = -4, to = 4, n = 2e2, ylim = c(0, 1)) curve(p_sph_stat_Rayleigh_HD(x, p = 3), n = 2e2, col = 2, add = TRUE) # Riesz curve(d_sph_stat_Riesz(x, p = 3, method = "HBE"), n = 2e2, from = 0, to = 5, ylim = c(0, 2)) curve(p_sph_stat_Riesz(x, p = 3, method = "HBE"), n = 2e2, col = 2, add = TRUE) # Sobolev x <- seq(-1, 5, by = 0.05) vk2 <- diag(rep(0.3, 2)) matplot(x, d_sph_stat_Sobolev(x = x, vk2 = vk2, p = 3), type = "l", ylim = c(0, 1), lty = 1) matlines(x, p_sph_stat_Sobolev(x = x, vk2 = vk2, p = 3), lty = 1) matlines(x, d_sph_stat_Sobolev(x = x, vk2 = vk2 + 0.01, p = 3), lty = 2) matlines(x, p_sph_stat_Sobolev(x = x, vk2 = vk2 + 0.01, p = 3), lty = 2) # Softmax curve(d_sph_stat_Softmax(x, p = 3, method = "HBE"), to = 2, n = 2e2, ylim = c(0, 2)) curve(p_sph_stat_Softmax(x, p = 3, method = "HBE"), n = 2e2, col = 2, add = TRUE) # Stereo curve(d_sph_stat_Stereo(x, p = 4, method = "HBE"), from=-5,to = 10, n = 2e2, ylim = c(0, 2)) curve(p_sph_stat_Stereo(x, p = 4, method = "HBE"), n = 2e2, col = 2, add = TRUE)
  • Maintainer: Eduardo García-Portugués
  • License: GPL-3
  • Last published: 2024-05-24