Description Usage Arguments Details Value Examples
This function fits a Multistate Cure model using Expectation-Maximization (EM) and Monte Carlo Expectation-Maximization (MCEM) algorithms as in Beesley et al. (2018) in Biostatistics.
1 2 3 4 | MultiCure(iternum, datWIDE, Cov, COVIMPUTEFUNCTION = NULL,
COVIMPUTEINITIALIZE = NULL, UNEQUALCENSIMPUTE = NULL,
ASSUME = "SameHazard", TransCov, IMPNUM = NULL, BASELINE = "weib",
PENALTY = "None", PARAMINIT = NULL)
|
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. If ridge or lasso penalties are being used, the covariates should be rescaled to have unit variances. |
COVIMPUTEFUNCTION |
This is a function for creating a single imputed version of the covariate set when covariate imputation is needed. This is user-specified. 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 user-specified. 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 (follow-up) 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 user-specified function. Inputs and outputs must match default versions. |
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 additional 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 |
In order to fit a model with no covariates for one or more of the transitions or the logistic regression, include an all-zero 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 follow-up, 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
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.
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.