elastic.net: Main Elastic Net Wrapper Function

Description Usage Arguments Value Examples

View source: R/elastic-net.R

Description

This function is a wrapper function to the glmnet::cv.glmnet() function to conduct LASSO / ElasticNet regularized regression. The regression optimizes the C statistic, forces the adjustment variables, and runs the algorithm using parallel processing.

Usage

1
elastic.net(data, terms, adjust, time, outc, .alpha = 1)

Arguments

data

The tibble containing the merged Protein and Study Data.

terms

The terms to consider in the LASSO Regression.

adjust

The vector of Adjustment variables to force

time

A character vector of the Survival time to event outcome variable.

outc

A character vector of the Survival event indicator outcome variable.

.alpha

The optional alpha parameter to change LASSO to Elastic Net.

Value

model

The returned cv.glmnet LASSO Elastic Net Model.

coefs

The coefficients of the Non-zero covariates retained.

terms

The Final retained Proteins from this model.

Examples

1
2
3
4
5
6
7
8
## Not run: 

 fifth.lasso <- elastic.net(fifth.visit,
                            bonferroni$kept,
                            adjust, time, outc)


## End(Not run)

pranavdorbala/proteomicsHF documentation built on March 9, 2021, 12:22 a.m.