JAM_A: Compute conditional A matrix

View source: R/JAM_A.R

JAM_AR Documentation

Compute conditional A matrix

Description

The JAM_A function is to get the conditional A matrix by using marginal A matrix

Usage

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

Arguments

marginalA

the marginal effects of SNPs on the exposures (Gx).

Geno

the reference panel (Geno), such as 1000 Genome

N.Gx

the sample size of each Gx. It can be a scalar or a vector. If there are multiple X's from different Gx, it should be a vector including the sample size of each Gx. If all alphas are from the same Gx, it could 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 matrix with conditional estimates which are converted from marginal estimates using the JAM model.

Author(s)

Lai Jiang

Examples

data(MI)
JAM_A(marginalA = MI.marginal.Amatrix, Geno = MI.Geno, N.Gx = c(339224, 659316), ridgeTerm = TRUE)
JAM_A(marginalA = MI.marginal.Amatrix, Geno = MI.Geno, N.Gx = c(339224, 659316),
eaf_Gx = MI.SNPs_info$ref_frq)

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