condLogLikDerDelta {edgeR}R Documentation

Conditional Log-Likelihood in Terms of Delta

Description

Conditional negative binomial log-likelihood parameterized in terms of delta (phi / (phi+1))

Usage

condLogLikDerDelta(y, delta, grid = TRUE, der = 1, doSum = TRUE) 

Arguments

y

matrix with count data (or pseudocounts)

delta

delta (phi / (phi+1))parameter of negative binomial

grid

logical, whether to calculate a grid over the values of delta

der

derivative, either 0 (the function), 1 (first derivative) or 2 (second derivative)

doSum

logical, whether to sum over samples or not (default TRUE

Details

This function computes the individual tag conditional log-likelihood for each tag. It is necessary for computing both the common conditional log-likelihood and the weighted conditional log-likelihood, which are used to find the common and tagwise (moderated) estimates of the dipsersion parameter. The delta scale for convenience (delta is bounded between 0 and 1).

Value

vector or matrix of function/derivative evaluations

Author(s)

Mark Robinson, Davis McCarthy

See Also

commonCondLogLikDerDelta and weightedCondLogLikDerDelta rely on condLogLikDerDelta, and at a user level, estimateCommonDisp and estimateTagwiseDisp are used to estimate the common and (moderated) tagwise dispersion estimates, respectively. condLogLikDerDelta calls condLogLikDerSize, the function that does the mathematical calculations.

Examples

y1<-matrix(rnbinom(10,size=1,mu=10),nrow=5)
v1<-seq(.1,.9,length=9)
ll1<-condLogLikDerDelta(y1,v1,grid=TRUE,der=0,doSum=FALSE)
ll2<-condLogLikDerDelta(y1,delta=.5,grid=FALSE,der=0)

[Package edgeR version 2.4.3 Index]