estimateDispersion-methods: Estimate the Dispersion factor in a beta-binomial model.

Description Usage Arguments Value Author(s) Examples

Description

This function estimates the dispersion factor in a beta-binomial model of the nucleotide counts. This model assumes that the count for nucleotide j at position i is distributed after a beta-binomial X_ib ~ BB(n_i; alpha, beta_ij), where n_i is the coverage. The base and nucleotide specific parameter beta_ij is estimated from the local mean by the method-of-moments estimate, alpha is a shared overdispersion parameter. It is estimated via a numerical optimization of the likelihood under the null-hypothesis.

Usage

1
2
3
4
5
6
7
estimateDispersion(test, control, ...)

## S4 method for signature 'deepSNV,missing'
estimateDispersion(test, control, alternative = NULL, interval = c(0,1000))

## S4 method for signature 'matrix,matrix'
estimateDispersion(test, control, alternative = NULL, interval = c(0,1000))

Arguments

test

Either a deepSNV object, or a matrix with the test counts.

control

Missing if test is a deepSNV object, otherwise missing.

...

Additional param passed to specific methods

alternative

The alternative to be tested. One of "greater", "less", "two-sided" (default). If test is a deepSNV object, automatically taken from the corresponding slot if unspecified.

interval

The interval to be screened for the overdispersion factor. Default (0,1000).

Value

A deepSNV-class object if the input was a deepSNV object. Otherwise the loglikelihood and the estimated parameter.

Author(s)

Moritz Gerstung

Examples

1
2
3
4
5
data("RCC", package="deepSNV")
plot(RCC)
summary(RCC)[,1:6]
RCC.bb = estimateDispersion(RCC, alternative = "two.sided")
summary(RCC.bb)

deepSNV documentation built on Nov. 8, 2020, 8:01 p.m.