wakefield_abf: Wakefield's Approximate Bayes Factor

Description Usage Arguments Value Author(s) References See Also Examples

Description

For a set of summary data from a genome-wide association study, provides an approximate Bayes factor for evidence of association of the trait with the SNP vs non-association.

Usage

1
wakefield.abf(beta, se, prior.sigma, log = FALSE, log10 = FALSE)

Arguments

beta

A single value or numeric vector. It should represent the observed effect size of a SNP on a trait from a genome-wide association study.

se

A single value or numeric vector that corresponds to the value(s) in beta. It should represent the standard error of the effect size of a SNP on a trait from a genome-wide association study.

prior.sigma

A single value or numeric vector. This is the prior on true effect sizes. If beta and se are vectors, this prior.sigma is permitted to be a single value, in which case, it will be applied over all values of beta and se.

log

When TRUE, the calculation will return the log of the Bayes factors. Cannot be TRUE if log10 = TRUE.

log10

When TRUE, the calculation will return the log10 of the Bayes factors. Cannot be TRUE if log = TRUE.

Value

If beta and se are vectors, then the output will be a numeric vector of Wakefield's approximate Bayes factors corresponding to the elements of beta and se. Otherwise, this function outputs a single numeric value.

Author(s)

Trochet, Holly

References

Wakefield, Jon. Bayes Factors for Genome-Wide Association Studies: Comparison with P-values. Genetic Epidemiology. 33:79–76. 2009.

See Also

meta.abf,exh.abf

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
##Test run on the Cotsapas data
#Get all the data for MS
MS <- cotsapas[,grep("^MS", names(cotsapas))]
MS[1:10,]

wakefield.abf(MS$MS.beta, MS$MS.SE, prior.sigma = 0.2)

#For a single value
i<-1
wakefield.abf(cotsapas$SLE.beta[i], cotsapas$SLE.SE[i], prior.sigma = 0.2)

trochet/metabf documentation built on Nov. 9, 2021, 1:08 p.m.