Description Usage Arguments Value Author(s) References Examples
View source: R/desponds_functions.R
This function fits a continuous type-I pareto distribution to a vector of count data. Given data x, a threshold Cmin, and letting n be the number of clones greater than u, the shape parameter alpha is computed as
n * 1/(∑ log(x/Cmin)) + 1.
The method considers every possible threshold (that is, every element of the vector unique(x)). The threshold and alpha which minimize the Kolmogorov-Smirnov statistic are selected.
1  | fdesponds(x)
 | 
x | 
 vector of counts.  | 
min.KS | 
 The value of the KS statistic for the fitted Pareto distribution.  | 
Cmin | 
 The inferred threshold.  | 
powerlaw.exponent | 
 The powerlaw exponent. This is equal to   | 
pareto.alpha | 
 The inferred shape parameter alpha of the fitted Pareto distribution.  | 
Desponds, Jonathan, Thierry Mora, and Aleksandra M. Walczak. "Fluctuating fitness shapes the clone-size distribution of immune repertoires." Proceedings of the National Academy of Sciences 113.2 (2016): 274-279. APA
1 2 3 4 5 6 7 8 9  | # Fit the model to sample data
data("repertoires")
fit1 <- fdesponds(repertoires[[1]])
fit2 <- fdesponds(repertoires[[2]])
fit1
fit2
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.