# getSizeNB: Maximum-likelihood and maximum-a-posteriori estimators for... In dexus: DEXUS - Identifying Differential Expression in RNA-Seq Studies with Unknown Conditions or without Replicates

## Description

Estimates the size parameter of a a negative binomial distribution from given data.

## Usage

 1 2  getSizeNB(x, maxCyc = 1000, eta = 0, rmax = Inf, method = "bisection") 

## Arguments

 x The input data. Must be a numeric vector. maxCyc The maximum number of cycles of the numeric procedure to find the estimator. (Default = 1000). eta The weight of the exponential prior. The higher eta, the lower the estimate for the size parameter. Setting eta = 0 means that the prior is not used and, therefore, the maximum-likelihood estimator is calculated. (Default = 0). rmax Upper bound on the size parameter. This corresponds to a truncated exponential prior. If not used there is a non-zero probability that the estimator for the size parameter is ∞. (Default = Inf). method The procedure used to solve the equation ∑_{k=1} ^N ψ (x_i+r) - Nψ(r)+N \log ≤ft(\frac{r}{r+ 1/N ∑_{i=1}^N x_i} \right) - η =0 for r. This can either be "bisection" or "regula falsi". (Default="bisection").

## Details

Depending on the parameters you can either obtain the Maximum-likelihood estimator or the maximum-a-posteriori estimator using an exponential prior.

 maximum-likelihood estimator eta = 0 maximum-a-posteriori estimator eta > 0

By setting the variable rmax to a positive value one can enforce an upper bound on the parameter.

The inverse of the size parameter is the overdispersion parameter.

## Value

"numeric" An estimate of the size parameter of the negative binomial distribution. The overdispersion parameter is the inverse of the size parameter of a negative binomial distribution

## Author(s)

Guenter Klambauer [email protected] and Thomas Unterthiner [email protected]

## Examples

 1 2 x <- rnbinom(mu=50, size=5, n=10) getSizeNB(x) 

dexus documentation built on May 2, 2018, 3:15 a.m.