plot_radial: plot_radial

Description Usage Arguments Value Author(s) References Examples

View source: R/plot_radial.R

Description

A function for producing radial IVW and MR-Egger plots either individually or simultaneously. The function allows for a variety of aesthetic and scaling options, utilising the output from the IVW_radial and egger_radial functions.

Usage

1
plot_radial(r_object, radial_scale, show_outliers, scale_match)

Arguments

r_object

An object of class "IVW" or "egger". For visualising both estimates simultaneously, both objects should be included as a vector c(A,B), where A and B denote the "IVW" and "egger" objects respectively.

radial_scale

Indicates whether to produce a plot including a full radial scale (TRUE), or a scatterplot showing only the effect estimates (FALSE).

show_outliers

Indicates whether display only the set of variants identified as outliers (TRUE) or the complete set of variants (FALSE). Note that when (show_outliers=TRUE), non-outlying variants further from the origin than the furthest outlier will cause an error message that one or more points have been omitted. These are non-outlying variants beyond the scale. If no outliers are present, a plot will be produced using the full set of variants, with an accompanying message indicating the absence of outliers.

scale_match

Indicates whether x and y axes should have the same range(TRUE), or different ranges (FALSE) This improves the interpretation of the radial scale, and is set to FALSE when the radial scale is omitted from the plot.

Value

A ggplot object containing a radial plot of either the IVW, MR-Egger, or both estimates simultaneously.

Author(s)

Wes Spiller; Jack Bowden.

References

Bowden, J., et al., Improving the visualization, interpretation and analysis of two-sample summary data Mendelian randomization via the Radial plot and Radial regression. International Journal of Epidemiology, 2018. 47(4): p. 1264-1278.

Examples

1
2
3
plot_radial(r_object,TRUE,TRUE,TRUE) 

plot_radial(c(r_object,r_object),TRUE,TRUE,FALSE)

WSpiller/MRPracticals documentation built on April 25, 2020, 10:52 a.m.