bfse: Computation of standard errors for Bayes factors

Description Usage Arguments Details Value References

View source: R/bfse.R


Compute the standard errors for the Bayes factors estimates.


bfse(pargrid, runs, nbatches, bfsize1 = 0.8, method = c("RL", "MW"),
  reference = 1, transf = FALSE, bmmcse.size = "sqroot")



A data frame with components "linkp", "phi", "omg", "kappa". Each row gives a combination of the parameters to compute the new standard errors.


A list with outputs from the function mcsglmm or mcstrga.


An integer scalar or vector of the same length as runs indicating the number of batches to create for computing the variance using the samples of the first stage.


A scalar or vector of the same length as runs with all integer values or all values in (0, 1]. How many samples (or what proportion of the sample) to use for estimating the Bayes factors at the first stage. The remaining sample will be used for estimating the standard errors in the second stage. Setting it to 1 will perform only the first stage.


Which method to use to calculate the Bayes factors: Reverse logistic or Meng-Wong.


Which model goes in the denominator.


Whether to use the transformed sample mu for the computations. Otherwise it uses z.


Size for computing the batch means Monte-Carlo variance using the samples of the second stage.


Uses the batch means method to compute the standard errors for Bayes factors.


A list with components

  • pargrid The inputted pargrid augmented with the computed standard errors.

  • bfEstimate The estimates of the Bayes factors

  • bfSigma The covariance matrix for the Bayes factors estimates.


Roy, V., Tan, A. and Flegal, J. (2015). Estimating standard errors for importance sampling estimators with multiple Markov chains. Technical report, Iowa State University.

geoBayes documentation built on May 20, 2017, 3:28 a.m.

Search within the geoBayes package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.