Title: | Enhanced Least Absolute Shrinkage and Selection Operator Regression Model |
---|---|
Description: | Performs some enhanced variable selection algorithms based on the least absolute shrinkage and selection operator for regression model. |
Authors: | Pi Guo |
Maintainer: | Pi Guo <[email protected]> |
License: | GPL-2 |
Version: | 1.1 |
Built: | 2025-02-12 04:56:36 UTC |
Source: | https://github.com/cran/elasso |
This function performs a LASSO logistic regression model using a bootstrap ranking procedure.
BRLasso(x, y, B = 5, Boots = 100, kfold = 10)
BRLasso(x, y, B = 5, Boots = 100, kfold = 10)
x |
the predictor matrix |
y |
the response variable, a factor object with values of 0 and 1 |
B |
the external loop for intersection operation, with the default value 5 |
Boots |
the internal loop for bootstrap sampling, with the default value 100 |
kfold |
the K-fold cross validation, with the default value 10 |
Guo, P., Zeng, F., Hu, X., Zhang, D., Zhu, S., Deng, Y., & Hao, Y. (2015). Improved Variable Selection Algorithm Using a LASSO-Type Penalty, with an Application to Assessing Hepatitis B Infection Relevant Factors in Community Residents. PLoS One, 27;10(7):e0134151.
library(datasets) head(iris) X <- as.matrix(subset(iris,iris$Species!="setosa")[,-5]) Y <- as.factor(ifelse(subset(iris,iris$Species!="setosa")[,5]=='versicolor',0,1)) # Fitting a bootstrap ranking LASSO (BRLASSO) logistic regression model BRLasso.fit <- BRLasso(x=X, y=Y, B=2, Boots=10, kfold=10) # Variables selected by the BRLASSO model BRLasso.fit$var.selected # Coefficients of the selected variables BRLasso.fit$var.coef
library(datasets) head(iris) X <- as.matrix(subset(iris,iris$Species!="setosa")[,-5]) Y <- as.factor(ifelse(subset(iris,iris$Species!="setosa")[,5]=='versicolor',0,1)) # Fitting a bootstrap ranking LASSO (BRLASSO) logistic regression model BRLasso.fit <- BRLasso(x=X, y=Y, B=2, Boots=10, kfold=10) # Variables selected by the BRLASSO model BRLasso.fit$var.selected # Coefficients of the selected variables BRLasso.fit$var.coef