MixtureUpdatePosterior: Updates posteriors from a given mixture prior

View source: R/MixtureUpdatePosterior.R

MixtureUpdatePosteriorR Documentation

Updates posteriors from a given mixture prior

Description

This function re-computes posteriors for (one class of) parameters from posteriors obtained by FitAllShrink and a new mixture prior obtained by MixtureUpdatePrior.

Usage

MixtureUpdatePosterior(fitall, updateoutput, fitall0=NULL, ncpus = 1, robustlarge=TRUE)

Arguments

fitall

A 2-component list object resulting from FitAllShrink or from CombinePosteriors.

updateoutput

A 2-component list object resulting from MixtureUpdatePrior.

fitall0

An optional 2-component list object resulting from FitAllShrink containing the fits under the null-model.

ncpus

Integer. The number of cpus to use for parallel computations.

robustlarge

Boolean. Add a small proportion of flat Gaussian prior to robustify results for large effects.

Details

Rescaling of posteriors is used as described in Van de Wiel et al. (2012). About robustlarge: in rare cases the fitted prior may mismatch extreme effects. For that we weigh the continuous part of the prior with a very small proportion (0.001) of a fairly flat prior (central gaussian with sd=5). This has almost no effect for most posteriors, but renders a better posterior for extreme effects.

Value

A list object with the same number of components as the first component of fitall (number of fits), each containing 3-component lists which contain

postbetanon0

Continuous component of the posterior (as matrix)

postbeta0

Point mass (often zero) mixture proportion

loglik

Marginal log-likelihood

Note

The resulting posteriors are for the main parameter or contrasts of interest only, which should be indicated in the shrinkpara and shrinklc option in MixtureUpdatePrior. Posteriors of other parameters do not alter with respect to those in fitall.

Author(s)

Mark A. van de Wiel

References

Van de Wiel MA, Leday GGR, Pardo L, Rue H, Van der Vaart AW, Van Wieringen WN (2012). Bayesian analysis of RNA sequencing data by estimating multiple shrinkage priors. Biostatistics.

See Also

MixtureUpdatePrior for finding the optimal mixture prior and FitAllShrink for fitting under standard parametric priors. In addition, see NonParaUpdatePosterior for posteriors given a nonparametric prior.


markvdwiel/ShrinkBayes documentation built on March 27, 2022, 7:47 p.m.