Title: | Renyi Outlier Test |
---|---|
Description: | renyi implements the Renyi Outlier Test <arXiv:2411.13542>, an outlier test designed for modern large scale testing applications, especially where prior information available. The test combines a vector of independent uniform p-values into one p-value with power against alternatives where a small number of p-values are non-null. The test can leverage prior probabilities/weights specifying which variables are likely to be outliers and prior estimates of effect size. The procedure is fast even when the number of initial p-values is large (e.g. in the millions) and numerically stable even for very small p-values (e.g. 10^-300). |
Authors: | Ryan Christ <[email protected]> |
Maintainer: | Ryan Christ <[email protected]> |
License: | Apache License (>= 2) |
Version: | 1.0.0 |
Built: | 2025-02-01 05:43:19 UTC |
Source: | https://github.com/ryanchrist/renyi |
A Generalization of Aldous Renyi's representation of exponential order statistics
generalized_renyi_transform(x, eta = NULL, zeta = NULL)
generalized_renyi_transform(x, eta = NULL, zeta = NULL)
x |
a vector of independent exponential random variables of the form |
eta |
vector of scale parameters implicit in the construction of |
zeta |
vector of shift parameters implicit in the construction of |
Maps a vector of shifted and scaled independent exponential random variables to a sequence of standard independent exponential random variables based on the gaps (jumps) between the initial random variables
a list containing two elements
a vector of independent standard exponentials where exps[1]
is the exponential jump corresponding to min(x)
and tail(exps,1)
is the exponential jump corresponding to max(x)
.
order(x)
.
Christ, R., Hall, I. and Steinsaltz, D. (2024) "The Renyi Outlier Test", arXiv:2411.13542 . Available at: doi:10.48550/arXiv.2411.13542.
# example code a <- rchisq(10,1) b <- rnorm(10) xx <- a*rexp(10)+b generalized_renyi_transform(xx, a, b)
# example code a <- rchisq(10,1) b <- rnorm(10) xx <- a*rexp(10)+b generalized_renyi_transform(xx, a, b)
A fast, numerically precise outlier test for a vector of exact p-values allowing for prior information
renyi(u, k = ceiling(0.01 * length(u)), pi = NULL, eta = NULL)
renyi(u, k = ceiling(0.01 * length(u)), pi = NULL, eta = NULL)
u |
a vector of p-values |
k |
a rough upper bound on the number of outliers expected to be present in u |
pi |
optional vector such that |
eta |
optional vector proportional to how far outlying we expect |
The about which p-values are outlying and "how much" of an outlier they are expected to be
a list containing three elements
the p-value returned by the Renyi Outlier Test;
a character string describing any problems that may have been encountered during evaluation, "default is no problems";
the vector of p-values used by the outlier test after adjusting the u
provided for pi
and eta
.
Christ, R., Hall, I. and Steinsaltz, D. (2024) "The Renyi Outlier Test", arXiv:2411.13542 . Available at: doi:10.48550/arXiv.2411.13542.
# example code p <- 1e4 u <- runif(p) u[c(53,88,32)] <- 1e-6 # add a few outliers renyi(u)$p_value # test for outliers without any prior knowledge renyi(u,pi=c(rep(1,100),rep(10^-3,p-100)))$p_value # test for outliers with prior knowledge
# example code p <- 1e4 u <- runif(p) u[c(53,88,32)] <- 1e-6 # add a few outliers renyi(u)$p_value # test for outliers without any prior knowledge renyi(u,pi=c(rep(1,100),rep(10^-3,p-100)))$p_value # test for outliers with prior knowledge