coda_glmnet {coda4microbiome}R Documentation

coda_glmnet

Description

Microbial signatures in cross-sectional studies. The algorithm performs variable selection through penalized regression on the set of all pairwise log-ratios. The result is expressed as the (weighted) balance between two groups of taxa. It allows the use of non-compositional covariates.

Usage

coda_glmnet(
  x,
  y,
  covar = NULL,
  lambda = "lambda.1se",
  nvar = NULL,
  alpha = 0.9,
  nfolds = 10,
  showPlots = TRUE,
  coef_threshold = 0
)

Arguments

x

abundance matrix or data frame (rows are samples, columns are variables (taxa))

y

outcome (binary or continuous); data type: numeric, character or factor vector

covar

data frame with covariates (default = NULL)

lambda

penalization parameter (default = "lambda.1se")

nvar

number of variables to use in the glmnet.fit function (default = NULL)

alpha

elastic net parameter (default = 0.9)

nfolds

number of folds

showPlots

if TRUE, shows the plots (default = TRUE)

coef_threshold

coefficient threshold, minimum absolute value of the coefficient for a variable to be included in the model (default =0)

Value

if y is binary: list with "taxa.num","taxa.name","log-contrast coefficients","predictions","apparent AUC","mean cv-AUC","sd cv-AUC","predictions plot","signature plot" if not:list with "taxa.num","taxa.name","log-contrast coefficients","predictions","apparent Rsq","mean cv-MSE","sd cv-MSE","predictions plot","signature plot"

Author(s)

M. Calle - T. Susin

Examples


data(Crohn, package = "coda4microbiome")

set.seed(123)

coda_glmnet(x_Crohn[,(1:10)],y_Crohn,showPlots= FALSE)



[Package coda4microbiome version 0.2.3 Index]