The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

Uniformity test on the Sphere

Giovanni Saraceno

Uniformity test on the Sphere

We generated \(n=200\) observations from the uniform distribution on \(S^{d-1}\), with \(d=3\), and \(\rho = 0.7\).

library(QuadratiK)
n <- 200
d <- 3
set.seed(2468)
z <- matrix(rnorm(n * d), n, d)
dat_sphere <- z/sqrt(rowSums(z^2))

The pk.test is used for testing uniformity of the generated sample.

rho = 0.7
set.seed(2468)
res_unif <- pk.test(x=dat_sphere, rho=rho)

res_unif
## 
##  Poisson Kernel-based quadratic distance test of Uniformity on the Sphere 
## Selected consentration parameter rho:  0.7 
## 
## U-statistic:
## 
## H0 is rejected:  FALSE 
## Statistic Un:  -0.9756673 
## Critical value:  0.02660107 
## 
## V-statistic:
## 
## H0 is rejected:  FALSE 
## Statistic Vn:  14.89598 
## Critical value:  23.22949

The summary method for the pk.test output object provides the results of the performed test, and generates a figure showing the qq-plots against the uniform distribution of each variable with a table of standard descriptive statistics.

summary_unif <- summary(res_unif)
## 
##  Poisson Kernel-based quadratic distance test of Uniformity on the Sphere 
##   Test_Statistics Critical_Value Reject_H0
## 1      -0.9756673     0.02660107     FALSE
## 2      14.8959834    23.22948694     FALSE

The figure automatically generated by the summary function on the result of the test for uniformity displays the qq-plots between the given samples and the uniform distribution with a table of the standard descriptive statistics for each variable.

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.