fdesponds {powerTCR} | R Documentation |
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.
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
# Fit the model to sample data data("repertoires") fit1 <- fdesponds(repertoires[[1]]) fit2 <- fdesponds(repertoires[[2]]) fit1 fit2