get_params: Estimate zero-inflated negative binomial parameters from a...

Description Usage Arguments Value Author(s) Examples

Description

This function estimates the parameters of a zero inflated negative binomial distribution based on a real count data set based on the method of moments. The function also returns a spline fit of log mean to log size which can be used when generating new simulated data.

Usage

1
get_params(counts, threshold = NULL)

Arguments

counts

A matrix of counts. If you want to simulate from a ballgown object, see fpkm_to_counts

threshold

Only estimate parameters from transcripts with row means greater than threshold

Value

p0 A vector of probabilities that the count will be zero, one for each gene/transcript.

mu The estimated negative binomial mean by method of moments for the non-zero counts

size The estimated negative binomial size by method of moments for the non-zero counts

fit A fit relating log mean to log size for use in simulating new data.

Author(s)

Jeff Leek

Examples

1
2
3
4
library(ballgown)
  data(bg)
  countmat = fpkm_to_counts(bg, mean_rps=400000)
  params = get_params(countmat)

alyssafrazee/polyester-release documentation built on May 12, 2019, 2:32 a.m.