ELCIC.glm.single | R Documentation |
The function ELCIC.glm.single
provides values of several model selection criteria including AIC, BIC, GIC, and ELCIC, given a candidate mean model.
ELCIC.glm.single(x, y, index.var=NULL, name.var = NULL, dist)
x |
A matrix containing covariates. The first column should contain all ones corresponding to the intercept if intercept is considered in your mean model. |
y |
A vector containing outcomes. |
index.var |
A vector containing index corresponding to candidate covariates (including the intercept). See more in details section. |
name.var |
A vector containing names of candidate covariates. The names should be subset of column names of x matrix. See more in details section. |
dist |
A specified distribution. It can be "gaussian", "poisson",and "binomial". |
"x" and "y" should be all observed. The corresponding individual data will be omitted in analysis if any missingness is detected.
Either arguments "index.var" or "name.var" is used to identify the candidate mean model. If both arguments are provided, only the argument "name.var" will be used.
A vector containing information criteria including ELCIC, AIC, BIC, and GIC.
## tests # load data data(glmsimdata) x<-glmsimdata$x y<-glmsimdata$y #candidate model index name.var<-c("intercept","x1","x2") index.var<-c(1,2,3) criteria<-ELCIC.glm.single(x, y, index.var =index.var, name.var = NULL, dist="poisson") criteria
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.