x: a vector of size nx or a matrix of size c(nx, 1).
p: integer giving the dimension of the ambient space Rp that contains Sp−1.
regime: type of asymptotic regime for the CJ12 test, either 1
(sub-exponential regime), 2 (exponential), or 3
(super-exponential; default).
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: ρ parameter for the Poisson test, a real in [0,1). Defaults to 0.5.
t: t parameter for the Rothman and Cressie tests, a real in (0,1). Defaults to 1 / 3.
s: s parameter for the s-Riesz test, a real in (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: κ parameter for the Softmax test, a non-negative real. Defaults to 1.
a: either:
an=a/n parameter used in the length of the arcs of the coverage-based tests. Must be positive. Defaults to 2 * pi.
a parameter for the Stereo test, a real in [−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
# Ajnecurve(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)# Bakshaevcurve(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)# Binghamcurve(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)# CJ12curve(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 Fncurve(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 Gncurve(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)# PADcurve(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)# PCvMcurve(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)# Poissoncurve(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)# PRtcurve(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)# Rayleighcurve(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 Rayleighcurve(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)# Rieszcurve(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)# Sobolevx <- 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)# Softmaxcurve(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)# Stereocurve(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)