identify_outliars: Identify outliars

View source: R/test.R

identify_outliarsR Documentation

Identify outliars

Description

This function takes the output from TwoSampleMR::harmonise_data() function and a list object including identified outliars

Usage

identify_outliars(
  dat,
  outliers = "RadialMR",
  outlier_correction = "none",
  outlier_threshold = ifelse(outlier_correction == "none", 0.05/nrow(dat), 0.05),
  use_proxies = FALSE,
  search_correction = "none",
  search_threshold = ifelse(search_correction == "none", 5e-08, 0.05),
  id_list = "default",
  include_outliers = FALSE,
  mr_method = "mr_ivw"
)

Arguments

dat

Output from harmonise_data. Note - only the first id.exposure - id.outcome pair will be used.

outliers

Default is to use the RadialMR package to identify IVW outliers. Alternatively can providen an array of SNP names that are present in dat$SNP to use as outliers.

outlier_correction

Defualt = "none", but can select from ("holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", "none").

outlier_threshold

If outlier_correction = "none" then the p-value threshold for detecting outliers is by default 0.05.

use_proxies

Whether to use proxies when looking up associations. FALSE by default for speed.

search_correction

Default = "none", but can select from ("holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", "none").

search_threshold

If search_correction = "none" then the p-value threshold for detecting an association between an outlier and a candidate trait is by default 5e-8. Otherwise it is 0.05.

id_list

The list of trait IDs to search through for candidate associations. The default is the high priority traits in available_outcomes().

include_outliers

When performing MR of candidate traits against exposures or outcomes, whether to include the original outlier SNP. Default is FALSE.

mr_method

Method to use for candidate trait - exposure/outcome analysis. Default is mr_ivw. Can also provide basic MR methods e.g. mr_weighted_mode, mr_weighted_median etc. Also possible to use "strategy1" which performs IVW in the first instance, but then weighted mode for associations with high heterogeneity.


asalzy/mrtryxhelpR documentation built on May 6, 2023, 11:52 p.m.