glmnet_enet_mr: Run elastic net-based mendelian randomisation from input MR...

View source: R/glmnet_enet_mr.R

glmnet_enet_mrR Documentation

Run elastic net-based mendelian randomisation from input MR object

Description

Lower level function. Takes input "MR input" object (created by mr_mvinput()) and performs elastic net mendelian randomisation with this input. Outputs a model of exposures and betas.

Usage

glmnet_enet_mr(
  object,
  cv = TRUE,
  lambda = 0.1,
  alpha = 0.1,
  cv.param = "lambda.1se"
)

Arguments

object

MR Input object. Contains a matrix of exposure SNPs to betas, exposure SNPs to SEs and then a list of outcome SNP betas and SEs.

Details

This function was written by Dr. Verena Zuber, <v.zuber(at)imperial.ac.uk> who has kindly given us permission to incorporate it into the PathWAS package. The original code for this can be found here: https://github.com/verena-zuber/demo_AMD/blob/master/mvMR_glmnet.R It works in a similar method to the MendelianRandomization R package in working from the same input object (a matrix of betas and SEs for every SNP used with each exposure).


Sabor117/PathWAS documentation built on Nov. 29, 2024, 7:44 a.m.