MLIC.wgee: The whole MLIC procedure for joint selection of mean...

View source: R/model_selection.R

MLIC.wgeeR Documentation

The whole MLIC procedure for joint selection of mean structure and correlation structure for missing longitudinal data under the mechanism of missing at random and drop-out

Description

This function provides the overall MLIC procedure for joint selection of mean structure and correlation structure in longitudinal data missing at random. It is also able to implement marginal mean structure selection given a prespecified working correlation structure. The data is dropout missing and missing at random.

Usage

MLIC.wgee(x,y,x_mis,r,id,time,candidate.sets=NULL, name.var.sets=NULL,dist,
      candidate.cor.sets=c("independence","exchangeable", "ar1"), joints=TRUE,lag=1)

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 model. Covariate matrix should be complete.

y

A vector containing outcomes. Use NA to indicate missing outcomes.

x_mis

A matrix containing covariates for the missing data model. The first column should be all ones corresponding to the intercept. This covariate matrix should be complete and all observed. See more in details section.

r

A vector indicating the observation of outcomes: 1 for observed records, and 0 for unobserved records.

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 is c("independence","exchangeable", "ar1") as default. 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.

lag

A numeric value indicating lag-response involved in the missing data model. It can be either 1 or 2. The default is 1.

Details

Covariate matrix "x" should be complete. If missing data are present in "x", the elements in covariate vector will be replaced by zeros for individuals who have missing covariates.

The argument "x_mis" includes all covariates to fit the missing data model. It does not contains a lag variable based on the outcome y. The argument "lag" in this function will automatically add lag-response variables to indicate the data missing at random.

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 vector with each element containing MLIC value for each candidate model. The row name of this vector is the selected correlation structure.

Examples

## tests
# load data
data(wgeesimdata)
dist<-"binomial"
x<-wgeesimdata$x
y<-wgeesimdata$y
x_mis<-wgeesimdata$x_mis
r<-wgeesimdata$obs_ind
id<-wgeesimdata$id
time=3
candidate.sets<-list(c(1,2))
candidate.cor.sets<-c("independence")
criterion.mlic<-MLIC.wgee(x,y,x_mis,r,id,time,candidate.sets,
            name.var.sets=NULL,dist,candidate.cor.sets,joints=FALSE)
criterion.mlic

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