fdesponds: Fit the type-I Pareto distribution as according to Desponds...

Description Usage Arguments Value Author(s) References Examples

View source: R/desponds_functions.R

Description

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.

Usage

1

Arguments

x

vector of counts.

Value

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 + 1

pareto.alpha

The inferred shape parameter alpha of the fitted Pareto distribution.

Author(s)

hbk5086@psu.edu

References

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

Examples

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

Example output

sh: 1: wc: Permission denied
Could not detect number of cores, defaulting to 1.
           min.KS              Cmin powerlaw.exponent      pareto.alpha 
       0.04428183       18.00000000        2.75600901        1.75600901 
           min.KS              Cmin powerlaw.exponent      pareto.alpha 
       0.08790801       34.00000000        3.05892821        2.05892821 

powerTCR documentation built on March 17, 2021, 6:01 p.m.