Description Usage Arguments Details Value Examples
This function fits a Multistate Cure model using ExpectationMaximization (EM) and Monte Carlo ExpectationMaximization (MCEM) algorithms. This function will obtain the maximum likelihood estimate of the model parameter, but it will not estimate standard errors.
1 2 3 4 
iternum 
number of iterations for the EM or MCEM algorithm 
datWIDE 
A data frame with the following columns (names must match):

Cov 
A data frame containing the covariates used in the model fit. The columns must be named. Factors must be represented as dummy variables. 
COVIMPUTEFUNCTION 
This is a function for creating a single imputed version of the covariate set when covariate imputation is needed. This is userspecified. See COVIMPUTEFUNCTION_Example.R for an example of the input and output structure. 
COVIMPUTEINITIALIZE 
This is a function for initializing the missing values of the covariates. This is userspecified. See COVIMPUTEINITIALIZE_Example.R for an example of the input and output structure. 
UNEQUALCENSIMPUTE 
This is a function for imputing the outcome data in the unequal censoring (followup) setting. This only needs to be specified when we have unequal censoring. Several default options are included in this package, but this could also be a userspecified function. Inputs and outputs must match default versions. 
trace 
This variable indicates whether the parameter estimates at each iteration are to be saved and, if imputation is needed, whether the imputed datasets are output 
ASSUME 
This variables indicates what equality assumptions we are making regarding the 24 and 14 transitions. The possible options are:

TransCov 
a list with elements: Trans13, Trans24, Trans14, Trans34, PNonCure. Each list element is a vector containing the names of the variables in Cov to be used in the model for the corresponding transition. 13 is NonCured > Recurrence, 24 is Cured > Death, 14 is NonCured > Death, 34 is Recurrence > Death. PNonCure contains the names of the covariates for the logistic regression for P(NonCure). 
IMPNUM 
number of imputed datasets. This is only used when covariates and/or outcome values are being imputed. 
BASELINE 
This variable indicates the assumptions about the baseline hazard form. This can take values 'weib' and 'cox' 
PENALTY 
This variable indicates whether we are using any variable selection in the model fitting. The current code has been implemented and tested for option 'None' (no variable selection). Additional options include 'Ridge' (ridge regression for all covariates in all models) and 'Lasso' (lasso for all covariates in all models, only implemented for Cox baseline hazards), but these two options have not been rigorously tested. 
PARAMINIT 
If desired, this can be a vector with initializations for the model parameters. The ordering of these parameters is c(beta, alpha, scale, shape) using the same ordering as in the output 
ImputeDat 
This argument is used in variance estimation for the MCEM algorithm. It provides an initialization for the imputed data. This argument can be ignored during routine EM and MCEM model fits. 
In order to fit a model with no covariates for one or more of the transitions or the logistic regression, include an allzero covariate in Cov and list that covariate for the corresponding transition/s in TransCov.
In order to include recurrence time in the model for recurrence > death, include covariate 'T_R' (initialized to equal the observed recurrence event/censoring time) in both Cov and Trans34 (in TransCov). If performing imputation for unequal followup, user must specify COVIMPUTEINITIALIZE and COVIMPUTEFUNCTION to update the values of 'T_R' based on the imputed outcome values.
fit If BASELINE = 'weib', this is a list containing
beta estimate at final iteration. The ordering is: Beta for Transition 1>3, Beta for Transition 2>4, Beta for Transition 1>4, Beta_0 if BASELINE equals 'ProportionalHazard', Beta for Transition 3>4
alpha estimate at final iteration.
scale estimate at final iteration. The ordering is: Transition 1>3, 2>4, 1>4, 3>4
shape estimate at final iteration. The ordering is: Transition 1>3, 2>4, 1>4, 3>4
If trace = T, fit will also contain estimates of beta, alpha, scale, and shape from each iteration and, if imputation is performed, the imputed values of Cov, G, Y_R, and delta_R from the last iteration. If imputation is not performed, includes the most recent weight p.
If BASELINE = 'cox', this is a list containing
beta estimate at final iteration. The ordering is: Beta for Transition 1>3, Beta for Transition 2>4, Beta for Transition 1>4, Beta_0 if BASELINE equals 'ProportionalHazard', Beta for Transition 3>4
alpha estimate at final iterations.
If trace = T, fit will also contain estimates of beta and alpha from each iteration and, if imputation is performed, the imputed values of Cov, G, Y_R, and delta_R from the last iteration. If imputation is not performed, includes the most recent weight p.
1 2 3 4 5 6  attach(SimulateMultiCure(type = "NoMissingness"))
Cov = data.frame(X1,X2)
VARS = names(Cov)
TransCov = list(Trans13 = VARS, Trans24 = VARS, Trans14 = VARS, Trans34 = VARS, PNonCure = VARS)
datWIDE = data.frame( Y_R, Y_D, delta_R , delta_D, G)
fit = MultiCure(iternum = 100, datWIDE, Cov, ASSUME = "SameHazard", TransCov = TransCov, BASELINE = "weib")

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.