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

hillarykoch/powerTCR documentation built on March 17, 2021, 8:05 p.m.