fitNbinomGLMsForMatrix {DESeq} | R Documentation

## Fit negative binomial GLMs to a count matrix.

### Description

This is a low-level function that is wrapped by `nbinomGLMTest`.

### Usage

    fitNbinomGLMsForMatrix(counts, sizeFactors, rawScv, modelFormula,
       modelFrame, quiet = FALSE, reportLog2 = TRUE, glmControl = list() )

### Arguments

`counts` | a matrix of integer counts. Rows for genes, Columns for samples.
`sizeFactors` | a vector with a size factor for each column in 'counts'.
`rawScv` | a vector with a raw SCV (i.e., a dispersion) for each row in 'counts'.
`modelFormula` | a model formula. The left hand side should read 'count ~'.
`modelFrame` | a model frame (with one row for each column in 'counts')
`quiet` | whether to not print dots
`reportLog2` | whether to convert reported coefficients from natural log to log2 scale
`glmControl` | list of additional parameters to be passed to `glm.control`

### Value

A data frame with one row for each gene and columns as follows:

- one column for each estimated coefficient, on a log2 scale (i.e., the natural log reported by `glm` is rescaled to base 2)

- a column 'deviance', with the deviance of the fit

- a boolean column 'converged', indicating whether the fit converged

Furthermore, the data frame has a scalar attribute 'df.residual' that contains the number of residual degrees of freedom.

### Author(s)

Simon Anders, sanders@fs.tum.de

### Examples

    # See the code of fitNbinomGLMs for an example.

[Package DESeq version 1.36.0 Index]