MR-PATH is a latent mixture model for heterogeneous causal mechanisms in Mendelian Randomization. See below for more information about the method.

PDF Github PosterUniversity of Exeter 9/24/20 Presentation Slides

The function `MRPATH_scatterplot`

in the `MRPATH`

R package has an `interactive`

option that creates a `plot_ly`

scatter-plot which displays information about
the SNPs and the model fit as you hover over it.

- If you hover over the points, you will get the RSID and the cluster membership probabilities from the MR-PATH model of that particular SNP.
- The lines and shaded regions give each cluster’s mean and 68% probability interval, respectively.
- If you hover the lines, you will get the exact proportion, mean, and standard deviation of that particular cluster.
- You can zoom into the plot by clicking and dragging the area you want to zoom into. To zoom out, just double click anywhere on the plot.

Here are a few examples of the interactive plots along with the code to produce them.

```
# Load MRPATH
library(MRPATH)
# Load HDL-CHD data from MRPATH
data(hdl_chd)
# Filter weak instruments
hdl_chd = hdl_chd[hdl_chd$pval.selection < 5e-8,]
# Find optimal initial values
Nreps = 50
initValsObj = MRPATH_optimizeInitVals(K, data = hdl_chd, Nreps = Nreps,
verbose=FALSE, init_seed = 5108)
# Get MC-EM fit with optimal initial values
MCEM_fit = initValsObj$fit
# Create interactive plot
MRPATH_scatterplot(hdl_chd, MCEM_fit, exposure_name="HDL", outcome_name="CHD", interactive=TRUE)
```

```
# Load MRPATH
library(MRPATH)
# Load HDL-CHD data from MRPATH
data(bmi_t2d)
# Find optimal initial values
Nreps = 50
initValsObj = MRPATH_optimizeInitVals(K, data = bmi_t2d, Nreps = Nreps,
verbose=FALSE, init_seed = 5108)
# Get MC-EM fit with optimal initial values
MCEM_fit = initValsObj$fit
# Create interactive plot
MRPATH_scatterplot(bmi_t2d, MCEM_fit, exposure_name="BMI", outcome_name="T2D", interactive=TRUE)
```