ELCIC.gee: The whole procedure for joint selection of mean structure and...

View source: R/model_selection.R

ELCIC.geeR Documentation

The whole procedure for joint selection of mean structure and correlation structure in longitudinal data without missingness or missing completely at random

Description

The function ELCIC.gee provides the overall procedure for joint selection of mean structure and correlation structure in longitudinal data without missingness or missing completely at random.

Usage

ELCIC.gee(x,y,r,id,time,candidate.sets=NULL,name.var.sets=NULL,dist,
      candidate.cor.sets=c("independence","exchangeable", "ar1"), joints=TRUE)

Arguments

x

A matrix containing covariates. The first column should be all ones corresponding to the intercept if the intercept is expected in the marginal mean. Covariate matrix should be complete. NA values will be replaced by 0 if missingness is detected in x.

y

A vector containing outcomes. If y is missing completely at random, use NA to indicate missing outcomes and specify argument "r".

r

A vector indicating the observation of data: 1 for observed records (both outcome and covariates are observed for a given subject), and 0 for unobserved records. The default setup is that all data are observed.

id

A vector indicating subject id.

time

The number of observations in total for each subject

candidate.sets

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

name.var.sets

A list 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".

candidate.cor.sets

A vector containing candidate correlation structures. When joints=TRUE, it can be any subset of c("independence","exchangeable", "ar1"). The default is c("independence","exchangeable", "ar1"). When joints=FALSE, it should be either of "independence","exchangeable", "ar1". See more in details section.

joints

A logic value for joint selection of marginal mean and working correlation structure. The default is TRUE. See more in details section.

Details

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.

When joints=TRUE, the argument "candidate.cor.sets" can contain multiple correlation structures; however, when joints=FALSE, it should contain either of "independence","exchangeable", "ar1". If multiple correlation structures are provided, only the first one will be used.

Value

A matrix with each element containing ELCIC value for each candidate model.

Examples

## tests
# load data
data(geesimdata)
x<-geesimdata$x
y<-geesimdata$y
id<-geesimdata$id
r<-rep(1,nrow(x))
time<-3
candidate.sets<-list(c(1,2,3))
candidate.cor.sets<-c("exchangeable")
dist<-"poisson"
criterion.elcic<-ELCIC.gee(x=x,y=y,r=r,id=id,time=time,candidate.sets=candidate.sets,
                name.var.sets=NULL,dist=dist,candidate.cor.sets=candidate.cor.sets)
criterion.elcic


ELCIC documentation built on Feb. 16, 2023, 7:18 p.m.