Description Usage Arguments Details Value Author(s) Examples
View source: R/condLogLikDerSize.R
Derivatives of the negative-binomial log-likelihood with respect to the dispersion parameter for each gene, conditional on the mean count, for a single group of replicate libraries of the same size.
1 2 | condLogLikDerSize(y, r, der=1L)
condLogLikDerDelta(y, delta, der=1L)
|
y |
matrix of counts, all counts in each row having the same population mean |
r |
numeric vector or scalar, size parameter of negative binomial distribution, equal to 1/dispersion |
delta |
numeric vector or scalar, delta parameter of negative binomial, equal to dispersion/(1+dispersion) |
der |
integer specifying derivative required, either 0 (the function), 1 (first derivative) or 2 (second derivative) |
The library sizes must be equalized before running this function. This function carries out the actual mathematical computations for the conditional log-likelihood and its derivatives, calculating the conditional log-likelihood for each gene.
Derivatives are with respect to either the size (r
) or the delta parametrization (delta
) of the dispersion.
vector of row-wise derivatives with respect to r
or delta
Mark Robinson, Davis McCarthy, Gordon Smyth
1 2 3 | y <- matrix(rnbinom(10,size=1,mu=10),nrow=5)
condLogLikDerSize(y,r=1,der=1)
condLogLikDerDelta(y,delta=0.5,der=1)
|
Loading required package: limma
[1] -0.3593449 -0.7003712 -1.6929778 0.4998632 0.5711717
[1] 1.437380 2.801485 6.771911 -1.999453 -2.284687
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.