SpikeSlabPosterior: Updates posteriors from a fit-object and a spike-and-slab...

SpikeSlabUpdatePosteriorR Documentation

Updates posteriors from a fit-object and a spike-and-slab prior

Description

Updates posteriors using a spike-and-slab prior.

Usage

SpikeSlabUpdatePosterior(fitall,fitall0, p0est,  modus="fixed", shrinkpara=NULL, shrinklc=NULL, ncpus=1,only0=FALSE)

Arguments

fitall

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

fitall0

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

p0est

Numeric. Estimate for fraction of null-hypotheses, usually obtained from SpikeSlabPrior

modus

Character string. Either "fixed", "random" or "logdisp". Type of variable for which the posterior is desired.

shrinkpara

Character or character vector. Name(s) of the variable(s) for which the posterior is desired. Corresponding variable can be a factor.

shrinklc

Character string. Name of the linear combination for which the posterior is desired.

ncpus

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

only0

Boolean. If TRUE, the function only computes the posterior probability of the null-model.

Details

This function allows one to use spike-and-slab priors, which usually results in a conservative False Discovery Rate estimate.

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

Author(s)

Mark A. van de Wiel

See Also

SpikeSlabPrior for computing the proportion of null-hypotheses.


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