confounder(
  exposure_trait = NULL,
  outcome_trait = NULL,
  type = c("confounder", "intermediate", "reverse_intermediate", "collider"),
  pval_threshold = 1e-05,
  mode = c("table", "raw")
)

Arguments

exposure_trait

A trait name, e.g. "Body mass index", leaving exposure_trait as NULL will return MR information related to a specific outcome. NOTE: exposure_trait and outcome_trait cannot be both NULL.

outcome_trait

A trait name, e.g. "Coronary heart disease", leaving outcome_trait as NULL will return MR information related to a specific exposure_trait. NOTE: exposure_trait and outcome_trait cannot be both NULL.

type

One in ["confounder", "intermediate", "reverse_intermediate", "collider"] Refer to the confounder view in web application for details

pval_threshold

P-value threshold

mode

If mode = "table", returns a data frame (a tibble as per tidyverse convention). If mode = "raw", returns a raw response from EpiGraphDB API with minimal parsing done by httr.

Value

Data from GET /confounder

Examples

confounder(exposure_trait = "Body mass index", outcome_trait = "Coronary heart disease")
#> # A tibble: 91 x 24 #> exposure.id exposure.trait outcome.id outcome.trait cf.id cf.trait r1.b #> <chr> <chr> <chr> <chr> <chr> <chr> <dbl> #> 1 ieu-a-2 Body mass ind… ieu-a-7 Coronary hea… ieu-… Hip cir… 0.817 #> 2 ieu-a-835 Body mass ind… ieu-a-7 Coronary hea… ieu-… Hip cir… 0.851 #> 3 ieu-a-95 Body mass ind… ieu-a-7 Coronary hea… ieu-… Hip cir… 0.929 #> 4 ieu-a-974 Body mass ind… ieu-a-7 Coronary hea… ieu-… Hip cir… 1.04 #> 5 ieu-a-2 Body mass ind… ieu-a-7 Coronary hea… ieu-… Obesity… 0.340 #> 6 ieu-a-835 Body mass ind… ieu-a-7 Coronary hea… ieu-… Obesity… 0.349 #> 7 ieu-a-95 Body mass ind… ieu-a-7 Coronary hea… ieu-… Obesity… 0.378 #> 8 ieu-a-974 Body mass ind… ieu-a-7 Coronary hea… ieu-… Obesity… 0.360 #> 9 ieu-a-2 Body mass ind… ieu-a-7 Coronary hea… ukb-… Trunk f… 0.587 #> 10 ieu-a-835 Body mass ind… ieu-a-7 Coronary hea… ukb-… Trunk f… 0.594 #> # … with 81 more rows, and 17 more variables: r1.se <dbl>, r1.pval <dbl>, #> # r1.method <chr>, r1.selection <chr>, r1.moescore <dbl>, r2.b <dbl>, #> # r2.se <dbl>, r2.pval <dbl>, r2.method <chr>, r2.selection <chr>, #> # r2.moescore <dbl>, r3.b <dbl>, r3.se <dbl>, r3.pval <dbl>, r3.method <chr>, #> # r3.selection <chr>, r3.moescore <dbl>