Learn R Programming

scrime (version 1.2.9)

abf: Approximate Bayes Factor

Description

Computes the Approximate Bayes Factor proposed by Wakefield (2009) for test statistics theta / sqrt(V) that under the null hypothesis are assumed to follow an asymptotic standard normal distribution.

Usage

abf(theta, V, W, numerator = 0, pi1 = NA)

Arguments

theta
a vector of numeric values, e.g., the maximum likelihood estimates for the parameter of a logistic regression model computed by separately applying this simple logistic regression to several SNPs. It is thus assumed that under the null hypothesi
V
a vector of the same length as theta containing the variances of the estimates comprised by theta.
W
the prior variance. Must be either a positive value or a vector of the same length as theta consisting of positive values.
numerator
either 0 or 1, specifying whether the numerator of the approximate Bayes factor comprises the probability for the null hypothesis or the probability for the alternative hypothesis.
pi1
either a numeric value between 0 and 1 specifying the prior probability of association or a vector of the same length as theta specifying for each of the SNPs a prior probability that this SNP is associated with the response. If s

Value

  • If pi1 = NA, a vector of the same length as theta containing the values of the approximate Bayes factor. If pi1 is specified, a list consisting of
  • ABFa numeric vector containing the values of the approximate Bayes factors,
  • priorOddseither a numeric value or a numeric vector comprising the prior odds of association (if numerator = 1) or no association (if numerator = 0),
  • postOddsa numeric vector containing the posterior odds of association (if numerator = 1) or no association (if numerator = 0),
  • and either
  • BFDPa numeric vector containing the Bayesian False Discovery Probabilities for the SNPs (if numerator = 0),
  • or
  • PPAa numeric vector comprising the posterior probabilities of association (if numerator = 1)l

References

Wakefield, J. (2007). A Bayesian Measure of Probability of False Discovery in Genetic Epidemiology Studies. American Journal of Human Genetics, 81, 208-227.