You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: vignettes/perform_mr.Rmd
+10-5Lines changed: 10 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -261,9 +261,12 @@ res <- mr(dat2)
261
261
In this example we wish to plot results from an MR analysis of the effect of multiple exposures on coronary heart disease, with results sorted by decreasing effect size (largest effect at the top of the plot) and with one MR method for each unique exposure-outcome combination. We will also make the size of each point estimate proportional to its inverse variance. This is a useful way to draw attention towards the most reliable results and away from results with very wide confidence intervals. To specify the size of the point estimate, set the weight argument to the name of the column in the data with the weight information.
262
262
263
263
```{r eval=FALSE}
264
-
res <- subset_on_method(res) # default is to subset on either the IVW method (>1 instrumental SNP) or Wald ratio method (1 instrumental SNP).
265
-
res <- sort_1_to_many(res, b = "b", sort_action = 4) # this sorts results by decreasing effect size (largest effect at top of the plot)
266
-
res <- split_exposure(res) # to keep the Y axis label clean we exclude the exposure ID labels from the exposure column
264
+
# default is to subset on either the IVW method (>1 instrumental SNP) or Wald ratio method (1 instrumental SNP).
265
+
res <- subset_on_method(res)
266
+
# this sorts results by decreasing effect size (largest effect at top of the plot)
267
+
res <- sort_1_to_many(res, b = "b", sort_action = 4)
268
+
# to keep the Y axis label clean we exclude the exposure ID labels from the exposure column
0 commit comments