select_snps: Selects SNPs for inclusion in MR by comparing per-variance...

View source: R/fit_models.R

select_snpsR Documentation

Selects SNPs for inclusion in MR by comparing per-variance effect sizes.

Description

Notes: sumstats passed to this function must be computed on the per-variance scale.

Usage

select_snps(
  sumstats,
  snps_to_use = NULL,
  p_thresh = 5e-08,
  exclusive = FALSE,
  weight = TRUE,
  filter = 1.6,
  verbose = FALSE
)

Arguments

sumstats

List with elements "beta_hat", "se_hat", both M x D matrices.

snps_to_use

List or NULL. A list named by phenotypes where each list entry is a list of SNPs that can be used for that phenotype. Usually the result of clumping to avoid correlated SNPs.

p_thresh

Float, p-value threshold to use for SNP inclusion.

exclusive

Bool. True to only use SNPs significant for one phenotype but *not* the other.

weight

Bool. True to store welch-test weights for regression.

filter

Double of NULL. If not NULL, filter variants with welch statistic less than filter.

verbose

Bool. If true, print phenotype label during iteration.


brielin/WWER documentation built on May 22, 2022, 7:28 p.m.