Description Usage Arguments Value Note Author(s) See Also Examples
This function performs a meta-analysis on summary statistics from multiple genome-wide association studies. It takes as its inputs the effect size estimates (betas
) and associated standard errors (ses
), and for some prior on true effect size and on the relationship between the effect size across studies, returns a Bayes factor that shows the evidence in favour of the alternative model against the null model of no true effect.
1 2 3 |
betas |
This is a vector, matrix, or data frame of observed effect sizes of a single SNP in a set of studies. If |
ses |
This is a vector, matrix, or data frame of standard errors corresponding to those in |
prior.sigma |
This is the prior on true effect sizes for each SNP in each study. It can be a single value that applies to all studies, set individually for each study (i.e. a vector whose length is equal to the number of studies in the meta-analysis) or set for each study and SNP (i.e. a matrix of same dimension as |
prior.cor |
This is the prior on the relationship between true effect sizes in each study. It is a square matrix whose row and column numbers are the same as the number of studies. Its elements are the pairwise correlation coefficients between true effect sizes of the studies. It can also take values “indep” (independent effects, where the values are 0 uniformly), “fixed” (fixed effects, where the values are 1 uniformly), “correlated” (uniform correlated effects, which requires the prior.rho parameter to be set). You may also simply input the desired matrix directly. If |
prior.rho |
If |
cryptic.cor |
This is a square matrix whose row and coumn numbers are the same as the number of studies. The off-diagonal elements are the pairwise correlation coefficients between the studies. If the studies in the meta-analysis are not independent of each other, it may be necessary to set this parameter so that the covariance in null effects is accounted for. |
log |
When |
log10 |
When |
tolerance |
This is the relative tolerance to detect zero singular values. Used in an internal function during the calculation of the approximate Bayes factor. This should probably never be altered, but is there as a last resort if the calculation is not returning the values that are expected. |
Returns the approximate Bayes factor for the data under the given priors against the null. For a single SNP, this is a single value. For a matrix with rows of SNPs, this will return a numeric vector.
Missing data should be marked NA
. Where these are included, the calculation will be performed with the subset of the data for which there is information.
Trochet, Holly and Pirinen, Matti
1 2 3 4 5 6 7 8 9 10 11 12 13 | #Obtain the matrices of betas and standard errors
betas <- cotsapas[,grep("\\.beta", names(cotsapas))]
ses <- cotsapas[,grep("\\.SE", names(cotsapas))]
betas[1:10,]
ses[1:10,]
#Perform an independent effects meta-analysis
meta.abf(betas, ses, prior.sigma = 0.2, prior.cor = "indep", log10 = TRUE)
#Single SNP analysis
i <- 1
meta.abf(betas[i,], ses[i,], prior.sigma = 0.2, prior.cor = "correlated", prior.rho = 0.5, log10 = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.