Description Usage Arguments Value Examples
Density function for the π_0 distribution.
1 | dpi0(pi0, n_targets, n_decoys)
|
pi0 |
vector of π_0 quantiles. |
n_targets |
vector of observed target PSMs. |
n_decoys |
vector of observed decoy PSMs. |
vector of densities. The length is the maximum length of the numerical arguments. Returns 'NaN' for 'pi0 < 0' and 'pi > 1'.
1 2 3 4 5 6 7 8 9 | ## density at pi0 = .5 when observing 10 targets and 3 decoys
dpi0(.5, 10, 3)
## visualize the pi0 distribution when observing 10 targets and 3 decoys
grid = seq(0,1,.01)
dens = dpi0(grid,10 , 3)
plot(dens, xlab = 'pi0', ylab = 'density')
##Alternatively, you can also use the function pi0plot()
pi0plot(10,3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.