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

# \dontrun{
confounder(exposure_trait = "Body mass index", outcome_trait = "Coronary heart disease")
#> # A tibble: 434 × 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-974   Body mass index ieu-a-8    Coronary hear… ukb-… Arm fat …  0.837 
#>  2 ieu-a-974   Body mass index ieu-a-8    Coronary hear… ukb-… Arm fat …  0.801 
#>  3 ieu-a-974   Body mass index ieu-a-8    Coronary hear… ukb-… Body mas…  0.806 
#>  4 ieu-a-974   Body mass index ieu-a-8    Coronary hear… ukb-… Intended… -0.414 
#>  5 ieu-a-974   Body mass index ieu-a-8    Coronary hear… ukb-… Trunk fa…  0.573 
#>  6 ieu-a-974   Body mass index ieu-a-8    Coronary hear… ukb-… Body mas…  0.698 
#>  7 ieu-a-974   Body mass index ieu-a-8    Coronary hear… ubm-… volume L…  0.0351
#>  8 ieu-a-974   Body mass index ieu-a-8    Coronary hear… met-… Total li…  0.0542
#>  9 ieu-a-974   Body mass index ieu-a-7    Coronary hear… ukb-… Waist ci…  0.887 
#> 10 ieu-a-974   Body mass index ieu-a-7    Coronary hear… ukb-… Body fat…  0.884 
#> # … with 424 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>
# }