abf: Approximate Bayes Factor

Description Usage Arguments Value Author(s) References

View source: R/abf.R

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

1
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 hypothesis theta / sqrt(V) is asymptotically standard normal distributed.

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 specified, prior odds, posterior odds, and depending on numerator the Bayesian False Discovery Probability (numerator = 0) or the posterior probability of association (numerator = 1) are computed. If NA, only the approximate Bayes factors are returned.

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

ABF

a numeric vector containing the values of the approximate Bayes factors,

priorOdds

either a numeric value or a numeric vector comprising the prior odds of association (if numerator = 1) or no association (if numerator = 0),

postOdds

a numeric vector containing the posterior odds of association (if numerator = 1) or no association (if numerator = 0),

and either

BFDP

a numeric vector containing the Bayesian False Discovery Probabilities for the SNPs (if numerator = 0),

or

PPA

a numeric vector comprising the posterior probabilities of association (if numerator = 1)l

Author(s)

Holger Schwender, holger.schw@gmx.de

References

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


scrime documentation built on May 2, 2019, 10:24 a.m.

Related to abf in scrime...