Implements the MRLocus colocalization step, in which summary statistics from A and B studies are used in a generative model, with a horseshoe prior on the latent true effect sizes. Posterior effect sizes and posterior SD are returned, although in pratice we use the original SE in the subsequent fitSlope model. See Supplementary Methods of the MRLocus manuscript.

fitBetaColoc(beta_hat_a, beta_hat_b, se_a, se_b, Sigma_a, Sigma_b, ...)

Arguments

beta_hat_a

vector of estimated coefficients for A

beta_hat_b

" " for B

se_a

vector of standard errors for beta_hat_a

se_b

" " for beta_hat_b

Sigma_a

correlation matrix of SNPs for A

Sigma_b

" " for B (this could be different for different LD matrix)

...

further arguments passed to rstan::sampling

Value

a list with the following elements:

  • stanfit object

  • posterior means for estimated coefficients for A and B

  • posterior standard deviations for A and B

  • scaling factors for A and B

Two important notes: (1) in MRLocus manuscript, original SE are used instead of posterior SD in the slope fitting step, (2) the posterior means and SD for estimated coefficients are appropriately scaled, while the results from the stanfit object are not scaled. In order to scale the results from the stanfit object, scale_a and scale_b

should be divided out from both coefficients and SDs (see Supplementary Methods).

References

Anqi Zhu*, Nana Matoba*, Emma P. Wilson, Amanda L. Tapia, Yun Li, Joseph G. Ibrahim, Jason L. Stein, Michael I. Love. MRLocus: identifying causal genes mediating a trait through Bayesian estimation of allelic heterogeneity. (2021) PLOS Genetics https://doi.org/10.1371/journal.pgen.1009455