condLogLikDerDelta {edgeR} | R Documentation |
Conditional negative binomial log-likelihood parameterized in terms of delta (phi / (phi+1)
)
condLogLikDerDelta(y, delta, grid = TRUE, der = 1, doSum = TRUE)
y |
matrix with count data (or pseudocounts) |
delta |
delta ( |
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 |
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).
vector or matrix of function/derivative evaluations
Mark Robinson, Davis McCarthy
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.
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)