Description Usage Arguments Value Author(s) Examples
Estimate cFDR at a set of points using kernel density estimate (cFDR3 or cFDR3s)
1 |
p |
vector of p-values for dependent variable of interest |
q |
vector of p-values from other dependent variable |
sub |
list of indices at which to compute cFDR estimates |
exclude |
list of indices to exclude (each point (p[i],q[i]) is still automatically included in the computation of its own cFDR value) |
adj |
include estimate of Pr(H^p=0|Q<q) in estimate |
... |
other parameters passed to kde2d |
vector of cFDR values; set to 1 if index is not in 'sub'
James Liley
1 2 3 4 5 6 7 8 9 10 | # Generate standardised simulated dataset
set.seed(1); n=10000; n1p=100; n1pq=100; n1q=100
zp=c(rnorm(n1p,sd=3), rnorm(n1q,sd=1),rnorm(n1pq,sd=3), rnorm(n-n1p-n1q-n1pq,sd=1))
zq=c(rnorm(n1p,sd=1), rnorm(n1q,sd=3),rnorm(n1pq,sd=3), rnorm(n-n1p-n1q-n1pq,sd=1))
p=2*pnorm(-abs(zp)); q=2*pnorm(-abs(zq))
cx=cfdry(p,q)
plot(p,q,cex=0.5,xlim=c(0,0.05)); points(p[which(cx<0.5)],q[which(cx<0.5)],col="red")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.