bfse: Computation of standard errors for Bayes factors

Description Usage Arguments Details Value References

View source: R/bfse.R

Description

Compute the standard errors for the Bayes factors estimates.

Usage

1
2
3
bfse(pargrid, runs, bfsize1 = 0.8, nbatch1 = 0.5, nbatch2 = 0.5,
  method = c("RL", "MW"), bvmethod = c("Standard", "TukeyHanning",
  "Bartlett"), reference = 1, transf = c("no", "mu", "wo"))

Arguments

pargrid

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

runs

A list with outputs from the function mcsglmm or mcstrga.

bfsize1

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.

nbatch1

A scalar or vector of the same length as runs. All values must be integers or less than 1. This is used for calculating how many batches to split each of the sample in runs for the calculation of the Bayes factors standard errors for the parameters corresponding to runs.

nbatch2

A scalar or vector of the same length as runs. All values must be integers or less than 1. This is used for calculating how many batches to split each of the sample in runs for the calculation of the Bayes factors standard errors for the parameters corresponding to pargrid.

method

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

bvmethod

Which method to use for the calculation of the batch variance. The standard method splits to disjoint batches. The second and third method use the spectral variance method with different lag windows.

reference

Which model goes in the denominator.

transf

Whether to use a transformed sample for the computations. If "no" or FALSE, it doesn't. If "mu" or TRUE, it uses the samples for the mean. If "wo" it uses an alternative transformation. The latter can be used only for the families indicated by .geoBayes_models$haswo.

Details

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

Value

A list with components

References

Roy, V., Tan, A. and Flegal, J. (2018). Estimating standard errors for importance sampling estimators with multiple Markov chains, Statistica Sinica, 28 1079-1101.


geoBayes documentation built on May 14, 2018, 1:03 a.m.

Related to bfse in geoBayes...