fit.NB: Fit negative binomial mixed models (NBMM) for one or more...

Description Usage Arguments Value Examples

Description

Fit NBMM for one or more features and output the fit parameters. It is used before the function computeVPC.NB(). This function also allows to test the presence of heritability via random effect variance of the model. To fit a NBMM, the glmmADMB package is needed.

Usage

1
fit.NB(CountMatrix, Strains, test = FALSE)

Arguments

CountMatrix

Sequencing count matrix for a list of features. Each row is for one feature, and the columns are for samples.

Strains

Strain labels for the samples.

test

TRUE or FALSE (default). Test the presence of heritability through examining the random effect variance .

Value

A list with two objects. The first object is a G x 3 matrix indicating the fitted parameters for each feature. The columns are ordered by α_g, σ_g^2, φ_g. Row names are feature names. If the argument test is set to be true, the second object of the list consists of p-values for testing the hypothesis that random effects sigma_a2 = 0; otherwise, the second object is NULL.

Examples

1
2
3
4
5
## Compute vpc for each feature under NBMM. This will take a while on the
##  entire dataset. For the purpose of illustration, here we only fit on 
##  the first 2 features.
library(glmmADMB)
result.nb <- fit.NB(simData[1:2, ], strains)

KechrisLab/HeritSeq documentation built on May 8, 2019, 4:48 p.m.