Package 'MRAID'

Title: MRAID(Mendelian Randomization with Automated Instrument Determination)
Description: MRAID is an R package for efficient statistical inference of two-sample Mendelian Randomization. MRAID takes GWAS summary statistics as inputs to estimate causal effects of one trait on another. MRAID is able to model an initial set of candidate SNP instruments that are in high LD with each other and perform automated instrument selection to identify suitable SNPs to serve as instrumental variables. MRAID simultaneously accounts for both uncorrelated and correlated horizontal pleiotropy, relies on a scalable sampling-based inference algorithm to perform numerical integration, circumventing the difficulty in likelihood function, leading to calibrated p-values that enable reasonably large-scale exposure screening.
Authors: Zhongshang Yuan and Lu Liu
Maintainer: Zhongshang Yuan <[email protected]>
License: GPL-3
Version: 1.0
Built: 2024-10-06 04:03:01 UTC
Source: https://github.com/yuanzhongshang/MRAID

Help Index


The function of MRAID method two sample Mendelian Randomization

Description

MRAID is able to model an initial set of candidate SNP instruments that are in high LD with each other and perform automated instrument selection to identify suitable SNPs to serve as instrumental variables. MRAID simultaneously accounts for both uncorrelated and correlated horizontal pleiotropy, relies on a scalable sampling-based inference algorithm to perform numerical integration, circumventing the difficulty in likelihood function

Usage

MRAID(
  Zscore_1,
  Zscore_2,
  Sigma1sin,
  Sigma2sin,
  samplen1,
  samplen2,
  Gibbsnumber = 1000,
  burninproportion = 0.2,
  pi_beta_shape = 0.5,
  pi_beta_scale = 4.5,
  pi_c_shape = 0.5,
  pi_c_scale = 9.5,
  pi_1_shape = 0.5,
  pi_1_scale = 1.5,
  pi_0_shape = 0.05,
  pi_0_scale = 9.95
)

Arguments

Zscore_1

the Zscore vector of the SNP effect size vector for the exposure

Zscore_2

the Zscore vector of the SNP effect size vector for the outcome

Sigma1sin

the LD matrix for the SNPs in the exposure GWAS data

Sigma2sin

the LD matrix for the SNPs in the outcome GWAS data,both Sigma2sin and sigma1sin are often from the same reference panel

samplen1

the sample size of exposure GWAS

samplen2

the sample size of outcome GWAS

Gibbsnumber

the number of Gibbs sampling iterations with the default to be 1000

burninproportion

the proportion to burn in from Gibbs sampling iterations, with default to be 0.2

pi_beta_shape

the prior shape paramter for pi_beta with the default to be 0.5

pi_beta_scale

the prior scale paramter for pi_beta with the default to be 4.5

pi_c_shape

the prior shape paramter for pi_c with the default to be 0.5

pi_c_scale

the prior shape paramter for pi_c with the default to be 9.5

pi_1_shape

the prior shape paramter for pi_1 with the default to be 0.5

pi_1_scale

the prior scale paramter for pi_1 with the default to be 1.5

pi_0_shape

the prior shape paramter for pi_0 with the default to be 0.05

pi_0_scale

the prior scale paramter for pi_0 with the default to be 9.95

Value

A list of estimated parameters including the p values for the causal effect test

causal_effect

The estimate of causal effect

causal_pvalue

The p value for the causal effect

correlated_pleiotropy_effect

The estimate of correlated pleiotropy effect

sigmaeta

The variance estimate for the uncorrelated pleiotropy effect

sigmabeta

The variance estimate for the SNP effect sizes on the exposure

sigma_error_1

The variance estimate of the error in exposure GWAS model

sigma_error_2

The variance estimate of the error in outcome GWAS model


MRAID

Description

MRAID

Usage

MRAID_CPP(
  betaxin,
  betayin,
  Sigma1sin,
  Sigma2sin,
  samplen1,
  samplen2,
  Gibbsnumberin,
  burninproportion,
  initial_betain,
  pi_beta_shape_in,
  pi_beta_scale_in,
  pi_c_shape_in,
  pi_c_scale_in,
  pi_1_shape_in,
  pi_1_scale_in,
  pi_0_shape_in,
  pi_0_scale_in,
  maxvarin,
  alphain
)