Provides an automated framework for penalized regression
analysis using Ridge Regression, Lasso Regression and Elastic Net
Regression. The package performs data standardization, training-testing
data partitioning, cross-validation for hyperparameter tuning, model
fitting, coefficient estimation, variable importance assessment,
prediction, and performance evaluation. It simplifies regularized
regression analysis by integrating the complete modeling workflow into
a single function suitable for researchers for better understanding
of the data.The methods are based on Hoerl
and Kennard (1970)
PenalReg is an R package for automated penalized regression analysis using Ridge Regression, Lasso Regression, and Elastic Net Regression.
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
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: