LLHSpectrumNegBinom: Likelihood that 1 observed spectrum was generated from a...

View source: R/LLHSpectrumNegBinom.R

LLHSpectrumNegBinomR Documentation

Likelihood that 1 observed spectrum was generated from a vector of expected mutation counts.

Description

Likelihood that 1 observed spectrum was generated from a vector of expected mutation counts.

Usage

LLHSpectrumNegBinom(spectrum, expected.counts, nbinom.size, verbose = FALSE)

Arguments

spectrum

An observed spectrum (a numeric vector)

expected.counts

A vector of (integer) expected mutation counts, one expected count for each mutation type. We want to know the likelihood that this model generated the observed spectrum, assuming each mutational types generates counts according to a negative binomial distribution with the given expected.counts (argument mu to NegBinomial) and dispersion parameter nbinom.size.

nbinom.size

The dispersion parameter for the negative binomial distribution; smaller is more dispersed. See NegBinomial.

verbose

If TRUE print messages under some circumstances.

Value

log(likelihood(spectrum | expected.counts)), or, in more detail, the sum of the negative binomial likelihoods that each each element of the spectrum (i.e., the count for each mutation type e.g. ACT > AAT) was generated from the expected count for that mutation type.


steverozen/mSigBG documentation built on Nov. 4, 2022, 10:58 a.m.