Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/dispCoxReidInterpolateTagwise.R
Estimate genewise dispersion parameters across multiple negative binomial generalized linear models using weighted Cox-Reid Adjusted Profile-likelihood and cubic spline interpolation over a genewise grid.
1 2 3 4 |
y |
numeric matrix of counts |
design |
numeric matrix giving the design matrix for the GLM that is to be fit. |
offset |
numeric scalar, vector or matrix giving the offset (in addition to the log of the effective library size) that is to be included in the NB GLM for the genes. If a scalar, then this value will be used as an offset for all genes and libraries. If a vector, it should be have length equal to the number of libraries, and the same vector of offsets will be used for each gene. If a matrix, then each library for each gene can have a unique offset, if desired. In |
dispersion |
numeric scalar or vector giving the dispersion(s) towards which the genewise dispersion parameters are shrunk. |
trend |
logical, whether abundance-dispersion trend is used for smoothing. |
AveLogCPM |
numeric vector giving average log2 counts per million for each gene. |
min.row.sum |
numeric scalar giving a value for the filtering out of low abundance genes. Only genes with total sum of counts above this value are used. Low abundance genes can adversely affect the estimation of the common dispersion, so this argument allows the user to select an appropriate filter threshold for the gene abundance. |
prior.df |
numeric scalar, prior degsmoothing parameter that indicates the weight to give to the common likelihood compared to the individual gene's likelihood; default |
span |
numeric parameter between 0 and 1 specifying proportion of data to be used in the local regression moving window. Larger numbers give smoother fits. |
grid.npts |
numeric scalar, the number of points at which to place knots for the spline-based estimation of the genewise dispersion estimates. |
grid.range |
numeric vector of length 2, giving relative range, in terms of |
weights |
optional numeric matrix giving observation weights |
In the edgeR
context, dispCoxReidInterpolateTagwise
is a low-level function called by estimateGLMTagwiseDisp
.
dispCoxReidInterpolateTagwise
calls the function maximizeInterpolant
to fit cubic spline interpolation over a genewise grid.
Note that the terms ‘tag’ and ‘gene’ are synonymous here. The function is only named ‘Tagwise’ for historical reasons.
dispCoxReidInterpolateTagwise
produces a vector of genewise dispersions having the same length as the number of genes in the count data.
Yunshun Chen, Gordon Smyth
Cox, DR, and Reid, N (1987). Parameter orthogonality and approximate conditional inference. Journal of the Royal Statistical Society Series B 49, 1-39.
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. https://doi.org/10.1093/nar/gks042
estimateGLMTagwiseDisp
, maximizeInterpolant
1 2 3 4 5 | y <- matrix(rnbinom(1000, mu=10, size=2), ncol=4)
design <- matrix(1, 4, 1)
dispersion <- 0.5
d <- dispCoxReidInterpolateTagwise(y, design, dispersion=dispersion)
d
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.