View source: R/gmte_continuous.R
gmte_continuous | R Documentation |
Performs analyses for the Triangulation WIthin A STudy (TWIST) framework to calcuate the ‘genetically moderated treatment effect’ (GMTE) for a continuous outcome. The gmte_continuous
function returns 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).
gmte_continuous(Y, T, G, Z, D, alpha = 0.05, doCAT = FALSE, verbose = FALSE)
Y |
The continuous outcome variable name (string) which appears in data.frame |
T |
The treatment variable name (string) which appears in data.frame |
G |
The genotype variable name (string) which appears in data.frame |
Z |
A string containing the model covariates to appear in the |
D |
A data.frame containing the above variables. |
alpha |
The p-value threshold for the chi-square test, estimating whether two estimates should be combined. Default is 0.05. |
doCAT |
Run the CAT analysis? Default is FALSE. |
verbose |
Return lots of output - useful for error checking. Default is FALSE. |
An object of class twistR_GMTE
containing the following components:
CAT
The summary statistics from the Corrected As Treated (CAT) analysis.
GMTE1
The summary statistics from the GMTE(1) analysis (i.e. in the treated individuals).
GMTE0
The summary statistics from the GMTE(0) analysis (i.e. in the untreated individuals).
MR
The summary statistics from the MR analysis.
RGMTE
The summary statistics from the Robust GMTE analysis (GMTE1 corrected for GMTE0).
FullCombined
The combined summary statistics from all analyses performed, inclduing combinations.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.