getRoughDispersions: Get rough Negative Binomial dispersion parameters

Description Usage Arguments Details Value

Description

Get rough Negative Binomial dispersion parameters using ordinary least squares.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
getRoughDispersions(x, ...)

## Default S3 method:
getRoughDispersions(x, ...)

## S3 method for class 'concensusWorkflow'
getRoughDispersions(x, ...)

## S3 method for class 'concensusDataSet'
getRoughDispersions(x, grouping = c("compound",
  "concentration", "strain"), ...)

Arguments

x

concensusWorkflow or concensusDataSet.

...

Other arguments.

Details

Based on the assumption:

Var(K) = μ + α μ^2

where K is count, μ is the mean count, and α is the Negative Binomial dispersion parameter. This is rearranged to:

α = (Var(K) - μ) / μ^2

The result is usually way off the final dispersion, but at least gives something reasonable to work from when estimating batch effects using a Negative Binomial GLM.

Value

concensusWorkflow or concensusDataSet with a new mean_variance_relationship and dispersion attribute.


eachanjohnson/concensusGLM documentation built on June 26, 2019, 2:26 a.m.