View source: R/ebic.glmm.bsreg.R
Backward selection regression for GLMM using the eBIC | R Documentation |
Backward selection regression for GLMM using the eBIC
ebic.glmm.bsreg(target, dataset, id, wei = NULL, gam = NULL, test = "testIndGLMMReg")
target |
The class variable. This can be a numerical vector with continuous data, binary or discrete valued data. It can also be a factor variable with two levels only. |
dataset |
The dataset; provide a numerical a matrix (columns = variables, rows = samples). |
id |
This is a numerical vector of the same size as target denoting the groups or the subjects. |
wei |
A vector of weights to be used for weighted regression. The default value is NULL. 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. |
test |
This is for the type of regression to be used, "testIndGLMMReg", for Gaussian regression, "testIndGLMMLogistic for logistic regression or "testIndGLMMPois" for Poisson regression. |
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. |
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.
Eugene Demidenko (2013). Mixed Models: Theory and Applications with R, 2nd Edition. New Jersey: Wiley & Sons.
fbed.glmm.reg, glmm.bsreg, MMPC.glmm
## Not run: require(lme4) data(sleepstudy) reaction <- sleepstudy$Reaction days <- sleepstudy$Days subject <- sleepstudy$Subject x <- matrix(rnorm(180 * 20),ncol = 20) ## unrelated preidctor variables m1 <- ebic.glmm.bsreg(reaction, x, id = subject) m2 <- MMPC.glmm(reaction, group = subject, dataset = x) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.