αj for each variant j represent the direct effects of the genetic variants on the outcome that are not mediated by the exposure. The total effect of each variant on the outcome comprises the direct effect (αj) and the indirect effect via the exposure (βγj). (1)Xi=∑j=1JγjGij+Ui+ϵiX (2)Yi=∑j=1JαjGij+βXi+Ui+ϵiY. Although the effects of the confounders on the exposure and on the outcome are taken as equal in equations (1) and (2), this assumption is not necessary and further parameters for these effects could be introduced into the model without affecting the methodological developments in this paper.