View source: R/quasi_gamma_poisson_shrinkage.R
variance_prior | R Documentation |
This function implements Smyth's 2004 variance shrinkage. It also supports covariates that are fitted to log(s2) with natural splines. This is based on the 2012 Lund et al. quasi-likelihood paper.
variance_prior(s2, df, covariate = NULL, abundance_trend = NULL)
s2 |
vector of observed variances. Must not contain |
df |
vector or single number with the degrees of freedom |
covariate |
a vector with the same length as s2. |
abundance_trend |
logical that decides if the additional abundance trend is fit
to the data. If |
a list with three elements:
estimate of the scale of the inverse Chisquared distribution. If
covariate is NULL
a single number, otherwise a vector of length(covariate)
estimate of the degrees of freedom of the inverse Chisquared distribution
the shrunken variance estimates: a combination of s2
and variance0
limma::squeezeVar()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.