nbinomUnitDeviance(y, mean, dispersion=0)
nbinomDeviance(y, mean, dispersion=0, weights=NULL)
nbinomDeviance
treats a vector as a matrix with one row.y
.y
.glmFit
.nbinomUnitDeviance
returns a numeric vector or matrix of the same size as y
.nbinomDeviance
returns a numeric vector of length equal to the number of rows of y
.
nbinomUnitDeviance
computes the unit deviance for each y
observation.
nbinomDeviance
computes the total residual deviance for each row of y
observation, i.e., weighted row sums of the unit deviances.Care is taken to ensure accurate computation for small dispersion values.
McCarthy, DJ, Chen, Y, Smyth, GK (2012). Differential expression analysis of multifactor RNA-Seq experiments with respect to biological variation. Nucleic Acids Research 40, 4288-4297. http://nar.oxfordjournals.org/content/40/10/4288
y <- matrix(1:6,3,2)
mu <- matrix(3,3,2)
nbinomUnitDeviance(y,mu,dispersion=0.2)
nbinomDeviance(y,mu,dispersion=0.2)
Run the code above in your browser using DataLab