Description Usage Arguments Details Value Author(s) Examples
View source: R/nullDistDoublyTestedEdges.R
Calculate the null distribution of the number of reciprocated, unreciprocated and missing edges in a stochastic model where each edge is tested twice.
1 | nullDistDoublyTestedEdges(deltaMax, n, pFP, pFN)
|
deltaMax |
Integer. Distributions will be calculated
for model parameter delta |
n |
Integer. The parameter n of the model. |
pFP |
Numeric. The parameter pFP of the model. |
pFN |
Numeric. The parameter pFN of the model. |
The model is described in the vignette Stochastic and systematic errors in PPI data, by looking at unreciprocated in- or out-edges by W. Huber, T. Chiang and R. Gentleman.
This function can be quite slow, its runtime grows quickly
with deltaMax
(and is roughly independent of n
, pFP
,
pFN
). The example below should take only a few seconds on a reasonable
computer, though.
3d array with dimensions nMax+1
x nMax+1
x
deltaMax+1
whose element p[nr+1, nu+1, delta+1]
is the corresponding joint probability. nMax+1
is calculated
(probably too conservatively) by the function to make sure that no
probability leaks out of the array.
Wolfgang Huber http://www.ebi.ac.uk/huber
1 2 3 4 5 6 7 8 9 10 | p = nullDistDoublyTestedEdges(32, 1000, pFP=0.001, pFN=0.15)
if(interactive() && require("RColorBrewer"))
for(k in 1:dim(p)[3]) {
image(sqrt(p[,,k]), xlab=expression(N[rec]), ylab=expression(N[unrec]),
main = expression(P(N[rec], N[unrec]~";"~ delta^"*", n, p[FP], p[FN])),
x = 1:dim(p)[1], y = 1:dim(p)[2],
col = colorRampPalette(brewer.pal(9, "GnBu"))(256))
text(35, 35, paste("delta", k, sep="="))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.