Description Usage Arguments Details Value
View source: R/COVIMPUTEFUNCTION_Example.R
The function COVIMPUTEFUNCTION_Example 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.
1 | COVIMPUTEFUNCTION_Example(datWIDE, param, ImputeDat, TransCov)
|
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:
|
TransCov |
defined as in MultiCure |
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.
CovImp a matrix with a SINGLE imputation of the covariate matrix
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.