fitlnpbin: fitlnpbin

View source: R/fitlnpbin.R

fitlnpbinR Documentation

fitlnpbin

Description

Function to fit a Lognormal-Poisson model to estimate overdispersion on synonymous changes for sitednds and codondnds.

Usage

fitlnpbin(
  nvec,
  rvec,
  level = 0.95,
  theta_option = "conservative",
  numbins = 10000
)

Arguments

nvec

Vector of observed counts of mutations per site.

rvec

Vector of expected counts of mutations per site.

level

Confidence level desired for the confidence interval of the overdispersion parameter [defaul=0.95]

theta_option

2 options: "mle" (uses the MLE of the overdispersion parameter) or "conservative" (uses the conservative bound of the CI95). Values other than "mle" will lead to the conservative option [default="conservative"]

numbins

Number of bins to discretise the rvec vector [default=1e4]. This enables fast execution of the LNP model in datasets of arbitrarily any size.

Value

'fitlnpbin' returns the maximum likelihood estimate and confidence intervals of the "sig" overdispersion parameter of the LNP model:

Author(s)

Inigo Martincorena (Wellcome Sanger Institute)


im3sanger/dndscv documentation built on Oct. 1, 2023, 1:05 p.m.