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.
abf(theta, V, W, numerator = 0, pi1 = NA)
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.
a vector of the same length as theta
containing the variances of the estimates comprised by theta
.
the prior variance. Must be either a positive value or a vector of the same length as theta
consisting of
positive values.
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.
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.
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
a numeric vector containing the values of the approximate Bayes factors,
either a numeric value or a numeric vector comprising the prior odds of association (if numerator = 1
)
or no association (if numerator = 0
),
a numeric vector containing the posterior odds of association (if numerator = 1
) or no association
(if numerator = 0
),
a numeric vector containing the Bayesian False Discovery Probabilities for the SNPs (if numerator = 0
),
a numeric vector comprising the posterior probabilities of association (if numerator = 1
)l
Wakefield, J. (2007). A Bayesian Measure of Probability of False Discovery in Genetic Epidemiology Studies. American Journal of Human Genetics, 81, 208-227.