mJAM_get_PrM: Get Pr(Model) based on BF-type model probability

View source: R/mJAM_build_CS.R

mJAM_get_PrMR Documentation

Get Pr(Model) based on BF-type model probability

Description

Also apply weighting to get robust estimates of yty

Usage

mJAM_get_PrM(
  GItGI,
  GIty,
  yty,
  yty_med,
  N_GWAS,
  C_id,
  prev_X_list = NULL,
  g = NULL,
  rare_SNPs = NULL,
  use_robust_var_est = FALSE
)

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.

C_id

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

prev_X_list

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

g

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

rare_SNPs

A numeric vector of ID(s) for rare SNP(s) which we do not apply weighting. Instead, we use the individual estimate of yty for these SNPs for robustness.

use_robust_var_est

whether to use linear combination of median yty and individual yty.

Value

post_prob

Posterior Pr(Model) for each SNPs in 'C_id'.

R2_est

R2 estimates of every one-SNP model (one for each SNPs in 'C_id').

n_miss

An integer vector of how many studies have missing values for each SNP.

Author(s)

Jiayi Shen


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