NumericUtilities: Numeric Utilities

NumericUtilitiesR Documentation

Numeric Utilities

Description

A set of function helper related to the statistical model underlying the COTAN package

Usage

funProbZero(dispersion, mu)

dispersionBisection(
  sumZeros,
  lambda,
  nu,
  threshold = 0.001,
  maxIterations = 100L
)

parallelDispersionBisection(
  genes,
  sumZeros,
  lambda,
  nu,
  threshold = 0.001,
  maxIterations = 100L
)

nuBisection(
  sumZeros,
  lambda,
  dispersion,
  initialGuess,
  threshold = 0.001,
  maxIterations = 100L
)

parallelNuBisection(
  cells,
  sumZeros,
  lambda,
  dispersion,
  initialGuess,
  threshold = 0.001,
  maxIterations = 100L
)

Arguments

dispersion

the estimated dispersion (a n-sized vector)

mu

the lambda times nu values (a n \times m matrix)

sumZeros

the number of genes not expressed in the relevant cell (a m-sized vector)

lambda

the estimated lambda (a n-sized vector)

nu

the estimated nu (a m-sized vector)

threshold

minimal solution precision

maxIterations

max number of iterations (avoids infinite loops)

genes

names of the relevant genes

initialGuess

the initial guess for nu (a m-sized vector)

cells

names of the relevant cells

Details

funProbZero is a private function that gives the probability that a sample gene's reads are zero, given the dispersion and mu parameters.

Using d for disp and \mu for mu, it returns: (1 + d \mu)^{-\frac{1}{d}} when d > 0 and \exp{((d - 1) \mu)} otherwise. The function is continuous in d = 0, increasing in d and decreasing in \mu. It returns 0 when d = -\infty or \mu = \infty. It returns 1 when \mu = 0.

dispersionBisection is a private function for the estimation of dispersion slot of a COTAN object via a bisection solver

The goal is to find a dispersion value that reduces to zero the difference between the number of estimated and counted zeros

parallelDispersionBisection is a private function invoked by estimateDispersionBisection() for the estimation of the dispersion slot of a COTAN object via a parallel bisection solver

The goal is to find a ⁠dispersion array⁠ that reduces to zero the difference between the number of estimated and counted zeros

nuBisection is a private function for the estimation of nu slot of a COTAN object via a bisection solver

The goal is to find a nu value that reduces to zero the difference between the number of estimated and counted zeros

parallelNuBisection is a private function invoked by estimateNuBisection() for the estimation of nu slot of a COTAN object via a parallel bisection solver

The goal is to find a ⁠nu array⁠ that reduces to zero the difference between the number of estimated and counted zeros

Value

the probability matrix that a read count is identically zero

the dispersion value

the dispersion values

the nu value

the dispersion values


seriph78/COTAN documentation built on May 2, 2024, 11:17 a.m.