sampleBma: Produce posterior samples from a Bayesian model average over...

Description Usage Arguments Details Value

View source: R/sampleBma.R


Based on the result list from glmBayesMfp, sample from the Bayesian model average (BMA) over the models contained in this list.


sampleBma(object, mcmc = McmcOptions(), postProbs = posteriors(object),
  nMargLikSamples = NULL, verbose = TRUE, ...)



valid GlmBayesMfp object containing the models over which to average


MCMC options object with class McmcOptions, specifying the number of required BMA samples (via sampleSize(mcmc)), and the burn-in and thinning parameters applied to each model (see above). If TBF is used, each sample is accepted, and the number of samples is given by sampleSize(mcmc).


vector of posterior probabilites (will be normalized within the function) for the weighting of the models in object (defaults to the normalized posterior probabilities)


If this is non-NULL, it specified the number of samples used for the marginal likelihood estimate for each model (see above).


should information on computation progress be given? (default)


optional further arguments already available for sampling from a single model: gridList, gridSize, newdata, weights, marginalZApprox, debug, useOpenMP. See sampleGlm for the meanings.


If TBF methodology is used (which is specified within the glmBayesMfp object), then Monte Carlo (MC) sampling is used. If the fully Bayesian, generalized hyper-g prior methodology is used, then the sampling is based on MCMC. Therefore, instead of only specifying the required number of samples and the model probabilities, one also needs to specify the burn-in length and the thinning parameter, which will be applied to every model from which at least one sample is included in the average. Alternatively, you can ask for MCMC marginal likelihood estimates for all models in the list. Then at least nMargLikSamples will be produced for each model, whether included in the BMA sample or not.


The result is a list with the following elements:


data frame containing the result from the function, and in addition BMA probabilities, BMA frequencies in the sample, acceptance ratios of the MCMC runs and optionally marginal likelihood estimates / standard errors.


an object of S4 class GlmBayesMfpSamples containing the samples from the BMA.

glmBfp documentation built on Sept. 7, 2018, 3:01 a.m.