identifyOutliers: Identify outliars

View source: R/identifyoutliars.R

identifyOutliersR Documentation

Identify outliars

Description

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

Usage

identifyOutliers(
  dat,
  outliers = "RadialMR",
  outlier_correction = "none",
  outlier_threshold = ifelse(outlier_correction == "none", 0.05/nrow(dat), 0.05)
)

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.

Value

List dat Cleaned dat input radialmr Results from RadialMR analysis outliers List of outliers used id_list List of GWAS IDs used search Result from search of outliers against GWAS IDs candidate_instruments Instruments for candidate traits candidate_outcome Extracted instrument SNPs from outcome candidate_outcome_dat Harmonised candidate - outcome dataset candidate_outcome_mr MR analysis of candidates against outcome candidate_exposure Extracted instrument SNPs from exposure candidate_exposure_dat Harmonised candidate - exposure dataset candidate_exposure_mr MR analysis of candidates against exposure


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