NBumiCompareModels {M3Drop} | R Documentation

## Compare negative binomial models

### Description

Compares the fit of the depth-adjusted negative binomial model and basic negative binomial model.

### Usage

    	NBumiCompareModels(counts, size_factor=(Matrix::colSums(counts)/median(Matrix::colSums(counts))))

### Arguments

`counts` | a numeric matrix of raw UMI counts, columns = samples, rows = genes.
`size_factor` | a calculated size factor for library size normalization.

### Details

Compares the fit of the depth-adjusted negative binomial model and basic negative binomial model. Depth -adjusted negative binomial is fit to raw molecule counts. Basic negative binomial is fit to library-size normalized counts. The absolute error between observed gene-specific dropouts and expectations given each model is calculated. And a plot of fitted and observed mean-expression vs dropouts is created.

### Value

A named list containing: errors : Vector of errors for each model. basic_fit : object for the basic negative binomial. adjusted_fit : object for the depth-adjusted negative binomial.

### Examples

    	library(M3DExampleData)
    	counts <- NBumiConvertData(Mmus_example_list$data)
    	out <- NBumiCompareModels(counts);
    	out$errors

[Package M3Drop version 1.20.0 Index]