dpi0: Density function for the pi_0 distribution.

Description Usage Arguments Value Examples

View source: R/functions.R

Description

Density function for the π_0 distribution.

Usage

1
dpi0(pi0, n_targets, n_decoys)

Arguments

pi0

vector of π_0 quantiles.

n_targets

vector of observed target PSMs.

n_decoys

vector of observed decoy PSMs.

Value

vector of densities. The length is the maximum length of the numerical arguments. Returns 'NaN' for 'pi0 < 0' and 'pi > 1'.

Examples

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)

compomics/search-all-assess-subset documentation built on May 13, 2019, 9:55 p.m.