From: gammaMAXT: a fast multiple-testing correction algorithm
(1) If (i modulo 20 = 1) estimate π,y 0,k and θ: |
(a) Set z=0. Create vector v of size S. |
(b) Randomly select integer r in [n+1,m]. |
(c) If T i,r =0, z=z+1, else store T i,r in v. |
(d) Repeat steps (b) and (c) until v is full. |
(e) Sort v. Remove the 90 % lowest values. The new size of v is \(N=\frac {S}{10}\). |
(f) Estimate \(\pi = \frac {S}{z + S}\). |
(g) Estimate y 0 by the minimum of v. |
(h) Estimate k: see below. |
(i) Estimate \(\theta = \frac {1}{kN}\sum \limits _{i=1}^{N} (v[i]-y_{0})\). |
(2) If (i modulo 20 ≠ 1), use the latest estimated values of π,y 0,k and θ. |
(3) Sample M i from the distribution of the maximum, whose CDF is \(F_{{\mathcal {Z}_{i}}}(z) = \left [\frac {\gamma \left (k,\frac {z-y_{0}}{\theta }\right)}{\Gamma (k)}\right ]^{\frac {(m-n)\pi }{10}}\). |