logLikDerP {edgeR}R Documentation

Log-Likelihood for Proportion

Description

Log-likelihood and derivatives for the proportion parameter (i,e, expression level) of negative binomial (mean = library size * proportion)

Usage

logLikDerP(p, y, lib.size, r, der = 0)

Arguments

p

vector of proportion parameters to be evaluated

y

matrix of counts

lib.size

vector of library sizes

r

size parameter of negative binomial distribution

der

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

Value

vector of the likelihood or specified derivative evaluations for each tag/gene

Author(s)

Mark Robinson, Davis McCarthy

See Also

estimatePs calls logLikDerP as part of the procedure for estimating the expression level(s) of each tag.

Examples

y<-matrix(rnbinom(20,size=1.5,mu=10),nrow=5)
d<-DGEList(counts=y,group=rep(1:2,each=2),lib.size=rep(c(1000:1001),2))

this.p<-rowMeans( y/ outer(rep(1,nrow(y)),d$samples$lib.size) )
d1p<-logLikDerP(this.p,y,d$samples$lib.size,r=1.5,der=1)

[Package edgeR version 2.4.3 Index]