ELCIC.glm {ELCIC}R Documentation

The whole variable selection procedure for mean structure in GLM

Description

The function ELCIC.glm provides the overall procedure for variable selection in GLM.

Usage

ELCIC.glm(x,y,candidate.sets,name.var.sets=NULL,dist)

Arguments

x

A matrix containing covariates. The first column should contain all ones corresponding to the intercept if the intercept is expected in the mean structure.

y

A vector containing outcomes.

candidate.sets

A list containing index corresponding to candidate covariates in each candidate model. See more in details section.

name.var.sets

A list containing names of candidate covariates corresponding to each candidate model. The names should be subset of column names of the x matrix. See more in details section.

dist

A specified distribution. It can be "gaussian", "poisson",and "binomial".

Details

"x" and "y" should be all observed. The corresponding individual data will be deleted if any missingness is detected.

Either arguments "candidate.sets" or "name.var.sets" is used to identify the set of candidate mean model. If both arguments are provided, only the argument "name.var.sets" will be used.

Value

A matrix with each element containing ELCIC value for each candidate model (in columns) and (in rows)

Examples

## tests
# load data
data(glmsimdata)
x<-glmsimdata$x
y<-glmsimdata$y
#candidate model index
candidate.sets<-list(c(1,2),c(1,2,3),c(1,2,3,4))
criteria<-ELCIC.glm(x, y, candidate.sets, name.var.sets = NULL, dist="poisson")
criteria


[Package ELCIC version 0.2.1 Index]