Description Usage Arguments Details Value References See Also Examples
Stepwise forward variable selection based on the combination of L1 and L0 penalties. The optimization is done using the "BFGS" method in stats::optim
1 |
Data |
should have the following structure: the first column must be the binary response variable y. |
lamda |
the tuning penalty parameter |
w |
the weight parameter for the sum (1-w)L0+ wL1 |
standardize |
Logical flag for the predictors' standardization, prior to fitting the model. Default is standardize=TRUE |
lamda and w parameters need to be tuned by cross-Validation using stepPenal::tuneParam
a list with the shrinked coefficients and the names of the selected variables, i.e those variables with an estimated coefficient different from zero. It also returns the value of the objective function, evaluated for the values of the coefficients.
Vradi E, Brannath W, Jaki T, Vonk R. Model selection based on combined penalties for biomarker identification. Journal of biopharmaceutical statistics. 2018 Jul 4;28(4):735-49.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # use the StepPenal function on a simulated dataset, with given lamda and w.
set.seed(14)
beta <- c(3, 2, -1.6, -1)
noise <- 5
simData <- SimData(N=100, beta=beta, noise=noise, corr=FALSE)
## Not run:
before <- Sys.time()
stepPenal<- StepPenal(Data=simData, lamda=1.5, w=0.3)
after <- Sys.time()
after-before
(varstepPenal<- stepPenal$coeffP)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.