PenalReg

PenalReg is an R package for automated penalized regression analysis using Ridge Regression, Lasso Regression, and Elastic Net Regression.

Installation

install.packages(“PenalReg”)

Example

library(PenalReg)

data(mtcars)

mtcars_subset <- data.frame( mpg = mtcars\(mpg, cyl = mtcars\)cyl, disp = mtcars\(disp, hp = mtcars\)hp, drat = mtcars\(drat, wt = mtcars\)wt, qsec = mtcars\(qsec, gear = mtcars\)gear, carb = mtcars$carb

fit <- PenalReg( data = mtcars_subset, response = “mpg”, cv = 5, verbose = FALSE )

fit

Common Warnings

Warning

There were missing values in resampled performance measures.

This warning is generated by the underlying caret package during cross-validation. It may occur when:

The warning does not necessarily indicate that the analysis has failed. The best-performing model is selected from the successfully evaluated parameter combinations.

To reduce the likelihood of this warning: