  Background: Mendelian randomization (MR) has been widely applied to causal
inference in medical research. It uses genetic variants as instrumental
variables (IVs) to investigate putative causal relationship between an exposure
and an outcome. Traditional MR methods have dominantly focussed on a two-sample
setting in which IV-exposure association study and IV-outcome association study
are independent. However, it is not uncommon that participants from the two
studies fully overlap (one-sample) or partly overlap (overlapping-sample).
Methods: We proposed a method that is applicable to all the three sample
settings. In essence, we converted a two- or overlapping- sample problem to a
one-sample problem where data of some or all of the individuals were
incomplete. Assume that all individuals were drawn from the same population and
unmeasured data were missing at random. Then the unobserved data were treated
au pair with the model parameters as unknown quantities, and thus, could be
imputed iteratively conditioning on the observed data and estimated parameters
using Markov chain Monte Carlo. We generalised our model to allow for
pleiotropy and multiple exposures and assessed its performance by a number of
simulations using four metrics: mean, standard deviation, coverage and power.
Results: Higher sample overlapping rate and stronger instruments led to
estimates with higher precision and power. Pleiotropy had a notably negative
impact on the estimates. Nevertheless, overall the coverages were high and our
model performed well in all the sample settings. Conclusions: Our model offers
the flexibility of being applicable to any of the sample settings, which is an
important addition to the MR literature which has restricted to one- or two-
sample scenarios. Given the nature of Bayesian inference, it can be easily
extended to more complex MR analysis in medical research.
