plotPoster: Plots posterior densities.

View source: R/plotPoster.R

plotPosterR Documentation

Plots posterior densities.

Description

Plots posterior densities, possibly including a posterior null point mass.

Usage

plotPoster(id, poster, miny = 10^(-4), xlabel = "", ylabel = "", plotlabels = NULL, cols = NULL, ltys = NULL,lwds =NULL, xran = NULL, 
xscatter = NULL, legendxy = NULL, legendbox = "n", include0 = TRUE)

Arguments

id

Integer. Index of feature for which the posterior density is desired

poster

A list of lists where each sublist contains posteriors of (possibly) multiple parameters (or linear combinations) from the same data. A posterior is represented as a matrix with two columns denoting support and posterior density.

miny

Numeric. Minimum value of density (in the tails)

xlabel

Character. Label for the x-axis.

ylabel

Character. Label for the y-axis.

plotlabels

Character vector. Label(s) for the graphs.

cols

Numerical or character vector. Colours of the graphs.

ltys

Numerical or character vector. Line types for the graphs.

lwds

Numerical vector. Line widths for the graphs.

xran

Numerical 2-component vector. Range for the x-values.

xscatter

Numeric. Scatter for the null point masses.

legendxy

Numerical 2-component vector. Determines (x,y)-location of the legend.

legendbox

Character. If legendbox="n" no legend box is drawn; if legendbox="o" a legend box is drawn.

include0

Boolean. include0=TRUE the null point mass is drawn as well.

Details

About posteriorlist: this usually results from NonParaUpdatePosterior, MixtureUpdatePosterior, BFUpdatePosterior or SpikeSlabUpdatePosterior. About xscatter: when multiple densities are displayed in one figure, the null point masses overlap. Hence, a small scatter is added to avoid the overlap.

Value

Plot.

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

SummaryTable for a summary table of all results.


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