SummaryTable: Convenience function that produces a summary table

View source: R/SummaryTable.R

SummaryTableR Documentation

Convenience function that produces a summary table

Description

This function produces various summary statistics from the final posteriors. Only features with BFDR smaller than BFDRthr are selected.

Usage

SummaryTable(poster,BFDRthr=0.1,diffthr = 0,direction="two-sided",pointmass=0,ndigit=3,ncpus=1)

Arguments

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.

BFDRthr

Numeric. Selection threshold for the BFDR.

diffthr

Numeric. Threshold for the null-probability to compute. It demarcates the null-domain from the alternative domain.

direction

Character string. Use direction="greater" if the null-hypothesis if of the form “parameter >= thr”, direction="lesser" if the null-hypothesis if of the form “parameter <= thr”, use direction="two-sided" if the null-hypothesis is of the form “parameter = thr”, use direction="equal" for multi-parameter inference.

pointmass

Numeric. Location of the pointmass. Only relevant when the components of posteriorlist contain a point mass.

ndigit

Integer. The number of decimal digits to be used for the output.

ncpus

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

Details

About posteriorlist: this usually results from NonParaUpdatePosterior, MixtureUpdatePosterior, BFUpdatePosterior or SpikeSlabUpdatePosterior. It may either contain only continous posteriors or a mix of those with a point mass (usually at 0 to force selection properties).

The summary table contains: poster null-probabilities, local fdr (equal posterior null-probabilities of direction ="equal" and diffthr = 0), Bayesian FDR and posterior means for all parameters or contrasts for which the posteriors are provided in posteriorlist.

We recommend to use direction="equal" only for Bayes factor type inference (for comparing nested models that differ by more than one parameter). If point null inference is desired for a single parameter, we recommend to use both direction="greater" and direction="lesser" as outlined in the examples.

Value

Data frame. The number of rows equals the number of features with “BFDR <= BFDRthr”. The first column contains the indices of the selected features, the other columns contain the summary statistics

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

SummaryWrap, BFDR and plotPoster for plotting posterior densities.

Examples

#See ShrinkSeq, ShrinkGauss and CombinePosteriors

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