bolshev.rec.vec: Distribution function of the order statistics of i.i.d....

Description Usage Arguments Details Value References Examples

Description

bolshev.rec.vec is a vectorized and unrolled implementation of the Bolshev recursion described in Shorack, Wellner (1986) which can be utilized to calculate probabilities for order statistics of i.i.d. uniform random variables.

Usage

1

Arguments

m

matrix whose columns are p-values sorted in descending order

Details

Denote by U_1,\cdots,U_n n i.i.d. uniform random variables on [0,1]. Denote by U_{1:n},\cdots,U_{n:n} their order statistics. Then the return value p contains the probabilities

p[i,j] = P(\forall k=i,\cdots,n: m[n-k+1,j] ≤ U_{k:n})

Value

matrix p containing the calculated probabilities

References

G. R. Shorack and J. A. Wellner (1986). Empirical Processes with Applications to Statistics

Examples

1
2
3
4
5
6
7
bolshev.rec.vec(cbind(rev(c(0.7,0.8,0.9))))
#result: c(0.016, 0.079, 0.271)
#monte carlo simulation
sim <- function(v) mean(replicate(1e4,all(v <= sort(runif(3)))))
set.seed(0)
c(sim(c(0.7,0.8,0.9)),sim(c(0,0.8,0.9)),sim(c(0,0,0.9)))
#similar result: c(0.0176, 0.0799, 0.2709)

MHTcop documentation built on May 2, 2019, 7:59 a.m.