goodTuring(x, conf=1.96)
goodTuringPlot(x)
goodTuringProportions(counts)
goodTuring
returns a list with componentsx
x
goodTuringProportions
returns a matrix of proportions of the same size
as counts
.x
are not used in the algorithm, but is returned by this function.
Sampson gives a C code version on his webpage at
goodTuringPlot
plots log-probability (i.e., log frequencies of frequencies) versus log-frequency.
goodTuringProportions
runs goodTuring
on each column of data, then
uses the results to predict the proportion of each gene in each library.# True means of observed species
lambda <- rnbinom(10000,mu=2,size=1/10)
lambda <- lambda[lambda>1]
# Oberved frequencies
Ntrue <- length(lambda)
x <- rpois(Ntrue, lambda=lambda)
freq <- goodTuring(x)
goodTuringPlot(x)
Run the code above in your browser using DataLab