EN.hJAM: Elastic net hJAM

View source: R/EN.hJAM.R

EN.hJAMR Documentation

Elastic net hJAM

Description

Function to implement regularized hJAM, including elastic net hJAM and lasso hJAM.

Usage

EN.hJAM(
  betas.Gy,
  N.Gy,
  eaf.Gy = NULL,
  Geno,
  A,
  tune_glmnet = 0.5,
  ridgeTerm = FALSE
)

Arguments

betas.Gy

The betas in the paper: the marginal effects of SNPs on the phenotype (Gy)

N.Gy

The sample size of the GWAS where you obtain the betas.Gy and betas_se.Gy

eaf.Gy

The effect allele frequency of the SNPs in betas.Gy

Geno

The individual level data of the reference panel. Must have the same order of SNPs as in the betas.Gy.

A

The conditional A matrix.

tune_glmnet

The \alpha used in the glmnet R package to tune the shrinkage parameter. Default is 0.5.

ridgeTerm

Add a small elelment to the diagnoal of X'X to make the matrix invertable.

Value

An object of the Regularized hJAM

numSNP

The number of SNPs that the user use in the instrument set.

Selected_variable_length

The number of selected intermediates, regardless of the credible sets.

Selected_variable_name

The label/name for each selected intermediates.

Coefficients

The coefficients of selected intermediates. Otherwise will be zero.

Author(s)

Lai Jiang

Examples

data(ENhJAM.SimulationSet)
EN.hJAM(betas.Gy = Simulation.betas.gwas, N.Gy = 5000, eaf.Gy = Simulation.maf.gwas,
Geno = Simulation.Geno, A = Simulation.Amatrix, ridgeTerm = FALSE)

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