mJAM_get_PrMed: Get Pr(Mediation) based on causal mediation models

View source: R/mJAM_build_CS.R

mJAM_get_PrMedR Documentation

Get Pr(Mediation) based on causal mediation models

Description

Also apply weighting to get robust estimates of yty

Usage

mJAM_get_PrMed(
  GItGI,
  GIty,
  yty,
  yty_med,
  N_GWAS,
  g = NULL,
  C_id,
  X_id,
  prev_X_list
)

Arguments

GItGI

A list of transformed statistics from 'get_XtX()' for each study.

GIty

A list of transformed statistics from 'get_z()' for each study.

yty

A list of transformed statistics from 'get_yty()' for each study.

yty_med

A numeric vector of median yty across all SNPs within each study.

N_GWAS

A numeric vector of GWAS sample size for each study.

g

The pre-specified 'g' in 'g'-prior formulation.

C_id

An ingeter vector of IDs for the SNPs to be tested.

X_id

An integer specifying the ID of the index SNP.

prev_X_list

A numeric vector of the ID(s) of previously selected index SNP(s).

Value

Post_Med_Prob

Posterior Pr(Mediation) for each SNPs in C_id.

Med_Effect_Size

Posterior mediation effect size for each SNPs in C_id.

Med_var_CX

Posterior variance of mediation effect in models with both C and X.

Med_var_C

Posterior variance of mediation effect in models with C only.

Author(s)

Jiayi Shen


USCbiostats/hJAM documentation built on Jan. 26, 2024, 5:27 p.m.