Implements the MRLocus slope fitting step, in which the estimated coefficients and their original SE are used to determine the mediation slope (alpha), and the dispersion of individual signal clusters around the slope (sigma). This function follows the colocalization step fitBetaColoc and extractForSlope. The output fitSlope can be visualized with plotMrlocus. For details on the model, see Supplementary Methods of the MRLocus manuscript. See vignette for example of model interpretation.

fitSlope(
  res,
  sd_beta = NULL,
  mu_alpha = NULL,
  sd_alpha = NULL,
  sd_sigma = NULL,
  ...
)

Arguments

res

list with the following named elements:

  • beta_hat_a - point estimates of coefficients for A from colocalization

  • beta_hat_b - " " for B

  • sd_a - sampling SD for beta_hat_a (in practice original SE are provided here)

  • sd_b - " " for beta_hat_b " "

  • alleles (optional) data.frame with allele information

sd_beta

prior SD for beta A (default value will be derived from data)

mu_alpha

prior mean for alpha (default value will be derived from data)

sd_alpha

prior SD for alpha (default value will be derived from data)

sd_sigma

prior SD for sigma (default value of 1)

...

further arguments passed to rstan::sampling

Value

list with the following elements: stanfit object, original estimated coefficients and standard deviations, as well as the alleles data.frame (if it was provided)

Details

Note that if summary statistics for only one SNP are provided a warning will be printed (this is not a recommended use of MRLocus) and a parametric simulation is used to estimate the slope, instead of the Bayesian model.

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