JAM_alphas: Compute conditional alphas

View source: R/JAM_A.R

JAM_alphasR Documentation

Compute conditional alphas

Description

The JAM_alphas function is to compute the conditional alpha vector for each X If only one X in the model, please use JAM_alphas instead of JAM_A A sub-step in the JAM_A function

Usage

JAM_alphas(marginalA, Geno, N.Gx, eaf_Gx = NULL, ridgeTerm = TRUE)

Arguments

marginalA

the marginal effects of SNPs on one exposure (Gx).

Geno

the reference panel (Geno), such as 1000 Genome

N.Gx

the sample size of the Gx. It can be a scalar.

eaf_Gx

the effect allele frequency of the SNPs in the Gx data.

ridgeTerm

ridgeTerm = TRUE when the matrix L is singular. Matrix L is obtained from the cholesky decomposition of G0'G0. Default as TRUE.

Value

A vector with conditional estimates which are converted from marginal estimates using the JAM model.

Author(s)

Lai Jiang

References

Lai Jiang, Shujing Xu, Nicholas Mancuso, Paul J. Newcombe, David V. Conti (2020). A Hierarchical Approach Using Marginal Summary Statistics for Multiple Intermediates in a Mendelian Randomization or Transcriptome Analysis. bioRxiv https://doi.org/10.1101/2020.02.03.924241.

Examples

data(MI)
JAM_alphas(marginalA = MI.marginal.Amatrix[, 1], Geno = MI.Geno, N.Gx = 339224)
JAM_alphas(marginalA = MI.marginal.Amatrix[, 1], Geno = MI.Geno, N.Gx = 339224,
eaf_Gx = MI.SNPs_info$ref_frq)

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