Learn R Programming

scanstatistics (version 0.1.0)

negbin_overdispersion: Computes the overdispersion parameter for a fitted negative binomial model.

Description

Computes the overdispersion parameter \(w=1+\mu/\theta\) for a negative binomial distribution parametrized by its expected value \(\mu\) and with variance \(\mu+\mu^2/\theta\). The overdispersion is added as a new column to the input data.table, meaning that this function modifies its input.

Usage

negbin_overdispersion(table)

Arguments

table

A data.table with columns mu, theta and possibly others.

Value

The same table, with a new column overdispersion.