gmte_plot | R Documentation |
Plot the individual and combined estimates from a Triangulation WIthin A STudy (TWIST) analysis. The gmte_plot
function takes an object of class twistR_GMTE
, containing effect estimates from the individual tests (such as RGMTE) and the results when combinations are performed (such as RGMTE+MR), and creates a forest plot, highlighting the individual and combined estimates, and indicating with a "*" when the combined estimate may be valid.
gmte_plot(
x,
plot_title = "",
plot_cat = FALSE,
cols = c("#f46036", "#2e294e", "#1b998b"),
pchs = c(15, 16, 23)
)
x |
An object of class |
plot_title |
A string to print as the plot title |
plot_cat |
Logical. Plot the CAT estimates? (Default=FALSE) |
cols |
Three colours to indiciate the three model types (GMTE0, individual estimates, combined estimates) |
pchs |
Three point types to indiciate the three model types (GMTE0, individual estimates, combined estimates) |
Jack Bowden; Luke Pilling.
Bowden, J., et al., The Triangulation WIthin A STudy (TWIST) framework for causal inference within Pharmacogenetic research. PLoS Genetics. https://doi.org/10.1371/journal.pgen.1009783
# Example using a continuous outcome (LDL), binary treatment (statins), and binary genotype (SLCO1B1*5 homozygotes) variables
Y="ldl"
T="statin"
G="slco1b1_5_hmz"
Z="age+PC1+PC2+PC3+PC4+PC5+PC6+PC7+PC8+PC9+PC10"
results=gmte_continuous(Y,T,G,Z,D)
gmte_plot(results, plot_title = "SLCO1B1*5 effect on LDL during statin treatment")
# If desired, remove CAT estimates for "cleaner" plot, as these are often orders of magnititude larger than the other estimates
gmte_plot(results, plot_title = "SLCO1B1*5 effect on LDL during statin treatment", plot_cat=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.