View source: R/MixtureUpdatePrior.R
MixtureUpdatePrior | R Documentation |
This is the direct maximization procedure, outlined in the Van de Wiel et al. (2012) reference below. It allows to replace one non-mixture prior by a symmetric mixture prior, which may be desirable for the main parameter of interest.
MixtureUpdatePrior(fitall,fitall0=NULL, shrinkpara=NULL, modus="mixt", shrinklc=NULL, lincombs=NULL,ntotal = 10000, maxsupport=6,pointmass=0, pminvec = c(0,0.25,0.5,0.75,1),p0vec = c(0.5,0.7,0.9,0.95,0.99,0.999,1), meanvec = c(0.1, 0.3, 0.5, 0.75,1.5),sdvec=c(0.2,0.5,0.8,1.5,3),meansdauto=TRUE, ncpus=2,refinegrid=TRUE,symmetric=FALSE)
fitall |
A 2-component list object resulting from |
fitall0 |
An optional 2-component list object resulting from |
shrinkpara |
Character or character string. Name(s) of the variable(s) for which the mixture prior is fit. Corresponding variable can be a factor. |
modus |
Character string. Parametric form of the continuous component. Either |
shrinklc |
Character string. Name of the linear combination for which the nonparametric prior is fit. |
lincombs |
List object. Name of the list object that contains the linear combination(s), usually created by |
ntotal |
Integer. Number of posteriors that are used to determine the new prior. |
maxsupport |
Numeric. maximum of the support of the prior and posteriors. For numerical stability. -maxsupport is the minimum of the support. |
pointmass |
Numeric. Location of the pointmass. |
pminvec |
Numerical vector. Grid values for probability mass on the negative component with respect to the continuous component.
Only relevant for |
p0vec |
Numerical vector. Grid values for probability mass on the point mass. |
meanvec |
Numerical vector. Grid values for mean of the continous component. |
sdvec |
Numerical vector. Grid values for standard deviatioon of the continous component. |
meansdauto |
Boolean. If |
ncpus |
Integer. The number of cpus to use for parallel computations. |
refinegrid |
Boolean. If |
symmetric |
Boolean. If |
This function corresponds to the direct maximization procedure in Van de Wiel et al. (2012). The procedure is currently only implemented for fixed
regression parameters or functions thereof. Also, only symmetric priors are currently supported.
About shrinklc
: it is assumed that only one type of linear combinations is present in the fit object fitall
.
A list with two components
allparam |
Numerical matrix with rows ordered according to log marginal likelihood, containing parameter values of the mixture prior and log marginal likelihood |
inputpar |
List with input parameters used |
Computing time increases proportionally with the product of the length of the parameters p0vec, meanvec, sdvec
and
of p0widevec, sdwidevec
if addwide=TRUE
. After a first run, it may be good to do a second one on a finer grid.
Mark A. van de Wiel
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.
NonParaUpdatePrior
for non-parametric priors and MixtureUpdatePosterior
for computing posteriors from the output
of this function.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.