Description Usage Arguments Value See Also

View source: R/quasi_gamma_poisson_shrinkage.R

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.

1 | ```
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:

- variance0
estimate of the scale of the inverse Chisquared distribution. If covariate is

`NULL`

a single number, otherwise a vector of`length(covariate)`

- df0
estimate of the degrees of freedom of the inverse Chisquared distribution

- var_pos
the shrunken variance estimates: a combination of

`s2`

and`variance0`

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.