cpsets: Multi-Set Intersection Probability

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

View source: R/psets.R

Description

Density and distribution function of multi-set intersection test.

Usage

1
2
3
dpsets(x,L,n,log.p =FALSE)
cpsets(x,L,n,lower.tail=TRUE,log.p=FALSE,
       simulation.p.value=FALSE,number.simulations=1000000)

Arguments

x

integer, number of elements overlap among all sets.

L

vector, set sizes.

n

integer, background population size.

lower.tail

logical; if TRUE, probability is P[overlap <= x], otherwise, P[overlap > x].

log.p

logical; if TRUE, probability p is given as log(p).

simulation.p.value

logical; if TRUE, probability p is computed from simulation.

number.simulations

integer; number of simulations.

Value

dpsets gives the density and cpsets gives the distribution function.

Author(s)

Minghui Wang <[email protected]>, Bin Zhang <[email protected]>

References

Minghui Wang, Yongzhong Zhao, and Bin Zhang (2015). Efficient Test and Visualization of Multi-Set Intersections. Scientific Reports 5: 16923.

See Also

supertest, MSET, cpdiff, dpdiff

Examples

1
2
3
4
5
6
7
## Not run: 
#set up fake data
n=500; A=260; B=320; C=430; D=300; x=170
(d=dpsets(x,c(A,B,C,D),n))
(p=cpsets(x,c(A,B,C,D),n,lower.tail=FALSE))

## End(Not run)

SuperExactTest documentation built on June 20, 2017, 9:14 a.m.