Backward selection regression using the eBIC | R Documentation |
Backward selection regression using the eBIC
ebic.bsreg(target, dataset, test = NULL, wei = NULL, gam = NULL)
target |
The class variable. Provide either a string, an integer, a numeric value, a vector, a factor, an ordered factor or a Surv object. |
dataset |
The dataset; provide either a data frame or a matrix (columns = variables, rows = samples). |
test |
The available tests: "testIndReg", "testIndPois", "testIndNB", "testIndLogistic", "testIndMMReg", "testIndBinom", "censIndCR", "censIndWR", "testIndBeta", "testIndZIP", "testIndGamma", "testIndNormLog" and "testIndTobit". |
wei |
A vector of weights to be used for weighted regression. The default value is NULL. It is not suggested when testIndMMReg is used. An example where weights are used is surveys when stratified sampling has occured. |
gam |
In case the method is chosen to be "eBIC" one can also specify the gamma parameter. The default value is "NULL", so that the value is automatically calculated. |
The algorithm is a variation of the usual forward selection. At every step, the most significant variable enters the selected variables set. In addition, only the significant variables stay and are further examined. The non signifcant ones are dropped. This goes until no variable can enter the set. The user has the option to redo this step 1 or more times (the argument K). In the end, a backward selection is performed to remove falsely selected variables.
A list including:
runtime |
The runtime required. |
info |
A matrix with the number of variables and the number of tests performed (or models fitted) at each round (value of K). |
mat |
A matrix with the selected variables and their eBIC. |
back.rem |
The variables removed in the backward phase. |
back.n.tests |
The number of models fitted in the backward phase. |
Michail Tsagris
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr
Borboudakis G. and Tsamardinos I. (2019). Forward-backward selection with early dropping. Journal of Machine Learning Research, 20(8): 1-39.
fs.reg, bic.fsreg, MMPC
dataset <- matrix( runif(100 * 15, 1, 100), ncol = 15 ) target <- rt(100, 10) a1 <- ebic.bsreg(target, dataset, test = "testIndReg") target <- rpois(100, 10) a2 <- ebic.bsreg(target, dataset, test = "testIndPois")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.