COVIMPUTEFUNCTION: COVIMPUTEFUNCTION

Description Usage Arguments Details Value

View source: R/COVIMPUTEFUNCTION_Example.R

Description

The function COVIMPUTEFUNCTION creates a single imputed version of the covariate matrix. An example function is included in the package, but the user must specify their own function when applying MultiCure to datasets with covariate missingness. This function must have input/output as described below.

Usage

1
COVIMPUTEFUNCTION(datWIDE, param, ImputeDat, TransCov)

Arguments

datWIDE

defined as in MultiCure

param

If baselines are WEIBULL, this is a vector containing beta, alpha, scale, and shape. If baselines are COX, this is a vector containing beta and alpha.

ImputeDat

This is a list with the following elements:

  • UnequalCens: A vector taking value 1 if the subject has unequal follow-up. Note: If subject is assumed cured in datWIDE, they are listed as UnequalCens = 0.

  • CovMissing: A matrix indicating which elements of Cov are missing. Not needed for this imputation.

  • CovImp: A list containing a single imputation of Cov

  • GImp: A vector with a recent single imputation of G

  • YRImp: A vector with a recent single imputation of Y_R

  • deltaRImp: A vector with a recent single imputation of delta_R If baselines are COX, then this will also include

  • Basehaz13: A matrix containing the estimate of the baseline hazard function for the 1->3 transition specified intervals

  • Basehaz24: A matrix containing the estimate of the baseline hazard function for the 2->4 transition specified intervals

  • Basehaz14: A matrix containing the estimate of the baseline hazard function for the 1->4 transition specified intervals

  • Basehaz34: A matrix containing the estimate of the baseline hazard function for the 3->4 transition specified intervals

TransCov

defined as in MultiCure

Details

The example code included in the package imputes missing covariate X2 in the Multistate cure model example. In the example code, a normal covariate is imputed using an approach similar to SMC-FCS in Bartlett et al. (2014) and Metropolis-Hastings methods. In practice, this function can use any imputation method the user desires. For example, the user-written function can call 'mice' in R to perform the imputation.

Value

CovImp a matrix with a SINGLE imputation of the covariate matrix


lbeesleyBIOSTAT/MultiCure documentation built on April 18, 2018, 11:08 p.m.