Backward selection regression for GLMM | R Documentation |
Backward selection regression for GLMM
glmm.bsreg(target, dataset, id, threshold = 0.05, wei = 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. |
threshold |
Threshold (suitable values in (0, 1)) for assessing p-values significance. Default value is 0.05. |
wei |
A vector of weights to be used for weighted regression. The default value is NULL. |
test |
This is for the type of regression to be used, "testIndGLMMReg", for Gaussian regression, "testIndGLMMLogistic for logistic regression or "testIndGLMMPois" for Poisson regression. |
If the sample size is less than the number of variables a meesage will appear and no backward regression is performed.
The output of the algorithm is S3 object including:
runtime |
The run time of the algorithm. A numeric vector. The first element is the user time, the second element is the system time and the third element is the elapsed time. |
info |
A matrix with the non selected variables and their latest test statistics and logged p-values. |
mat |
A matrix with the selected variables and their latest statistics and logged p-values. |
final |
The final regression model. |
Michail Tsagris
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr
Eugene Demidenko (2013). Mixed Models: Theory and Applications with R, 2nd Edition. New Jersey: Wiley & Sons.
fbed.glmm.reg, ebic.glmm.bsreg, MMPC.glmm
## Not run: require(lme4) data(sleepstudy) reaction <- sleepstudy$Reaction days <- sleepstudy$Days subject <- sleepstudy$Subject x <- matrix(rnorm(180 * 200),ncol = 200) ## unrelated predictor variables m1 <- glmm.bsreg(Reaction, x, subject) m2 <- MMPC.glmm(target = 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.