mJAM_get_condp: Get conditional p-value under mJAM model

View source: R/mJAM_get_condp_logp.R

mJAM_get_condpR Documentation

Get conditional p-value under mJAM model

Description

Get conditional p-value under mJAM model

Usage

mJAM_get_condp(
  GItGI,
  GIty,
  yty,
  yty_med,
  N_GWAS,
  g = NULL,
  selected_id,
  use_robust_var_est = FALSE,
  use_median_yty_ethnic = NULL,
  rare_id = NULL
)

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

Hyperparameter in g-prior. If 'NULL', it will be set to 'sum(N_GWAS)'.

selected_id

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

use_robust_var_est

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

use_median_yty_ethnic

A numeric vector of study index in which median_yty is used for all SNPs in 'selected_id'.

rare_id

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

Value

which_condp_min

The index of which SNP has the smallest conditional p-value.

condp_min

The smallest conditional p-value.

condp

A vector of all conditional p-values.

effect_est

A vector of all conditional effect estimates.

se_est

A vector of standard errors of all the conditional effect estimates.

condp_mx

A complete matrix recording all conditional effect est & se for testing SNPs and 'selected_id'.

Author(s)

Jiayi Shen


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