get_cond_alpha: Compute conditional alphas

Description Usage Arguments Value Author(s) References Examples

View source: R/get_cond_A.R

Description

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

Usage

1
get_cond_alpha(alphas, Gl, N.Gx, ridgeTerm = FALSE)

Arguments

alphas

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

Gl

the reference panel (Gl), such as 1000 Genome

N.Gx

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

ridgeTerm

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

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

1
2
3
4
data(Gl)
data(betas.Gy)
data(marginal_A)
get_cond_alpha(alphas = marginal_A[, 1], Gl = Gl, N.Gx = 339224, ridgeTerm = TRUE)

hJAM documentation built on March 26, 2020, 8:13 p.m.