glmm.bsreg: Backward selection regression for GLMM

View source: R/glmm.bsreg.R

Backward selection regression for GLMMR Documentation

Backward selection regression for GLMM

Description

Backward selection regression for GLMM

Usage

glmm.bsreg(target, dataset, id, threshold = 0.05, wei = NULL, test = "testIndGLMMReg") 

Arguments

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.

Details

If the sample size is less than the number of variables a meesage will appear and no backward regression is performed.

Value

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.

Author(s)

Michail Tsagris

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr

References

Eugene Demidenko (2013). Mixed Models: Theory and Applications with R, 2nd Edition. New Jersey: Wiley & Sons.

See Also

fbed.glmm.reg, ebic.glmm.bsreg, MMPC.glmm

Examples

## 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)

MXM documentation built on Aug. 25, 2022, 9:05 a.m.