TMT.test: A method for combining p-values based on a changepoint model

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Under the null hypothesis that p_1, …, p_n are independent and uniformly distributed on [0,1], this function computes the p-value for the maximum likelihood of the changepoint model d(p) \propto λ_1 if p ≤ τ and d(p) \propto λ_2 otherwise, where d is a piecewise constant density with one changepoint, with unknown parameters λ_1 ≥ λ_2 and τ \in [0,1]. The null hypothesis is λ_1 = λ_2.

Usage

1
TMT.test(x, method = "AUTO", maxtau = 1, samples = 1000)

Arguments

x

a vector of p-values.

method

if “AUTO” then the computation method will be chosen automatically. If “NOE”, the p-value is computed exactly (effort is order n^2) by Noe's recursion. If "SIM", then the p-value is determined by simulation.

maxtau

restrict the changepoint to a maximum maxtau. Useful if we are only interested in testing small p-values.

samples

number of samples used for simulation. Ignored if method is “NOE” or method is “AUTO” with n < 1000.

Details

The p-value for the maximum likelihood can be restated as the solution to

P[u_1 ≥ o_1, …, u_n ≥ o_n],

where o_1, …, o_n are a sequence determined from the maximum likelihood and u_1, …, u_n are ordered uniform random variables. Computing this probability is harder than it looks, because simple analytical recursions fail due to catastrophic cancellation. We have implemented Noe's recursions, which are safe but expensive for large n, so we recommend simulation for n ≥ 1000. This will be done automatically if method=“AUTO”.

Value

lk

the maximum likelihood.

TMTi

the rank of the largest p-value to the left of the estimated changepoint (the rank of the largest p-value in the group of ‘small’ p-values).

TMTu

the largest p-value to the left of the changepoint (the largest p-value in the group of ‘small’ p-values).

p

the p-value of the test. If maxtau was set, and no inputs were lower than maxtau, the p-value returned is 1.

Author(s)

Patrick Rubin-Delanchy <patrick.rubin-delanchy@bristol.ac.uk>

References

Patrick Rubin-Delanchy and Nicholas A Heard. “A test for dependence between two point processes on the real line”. arXiv:1408.3845.

Noe, M. (1972). The calculation of distributions of two-sided Kolmogorov-Smirnov type statistics. The Annals of Mathematical Statistics, pages 58-64.

Noe, M. and Vandewiele, G. (1968). The calculation of distributions of Kolmogorov-Smirnov type statistics including a table of significance points for a particular case. The Annals of Mathematical Statistics, 39(1):233-241.

See Also

F.test, simes.test

Examples

1
2
3
4
5
6
7
8
9
## This should be uniformly distributed
TMT.test(runif(10))$p
## Whenever no p-values fall inside [0,maxtau] the returned p-value is one
replicate(20,TMT.test(runif(10), maxtau=.1)$p)
##Use maxtau to gain extra detection power if only interested in a
##subset of very low p-values, e.g.
TMT.test(c(.04, .5))$p
##is larger than
TMT.test(c(.04, .5), maxtau=0.05)$p

mppa documentation built on May 2, 2019, 2:48 a.m.