Description Usage Arguments Details Value Examples
The function VarianceMCEM performs variance estimation for the Multistate Cure Model when the model is fit using a Monte Carlo EM Algorithm. Standard errors are estimated across imputed datasets by 1) applying logistic and proportional hazards model fits and extracting standard errors or 2) via bootstrap resampling. Then, Rubin's rules are used to obtain a single set of parameter estimates and standard errors across imputed datasets.
1 2 3 4 | VarianceMCEM(fit, var_method = "default", bootnum = 50, datWIDE,
ASSUME, TransCov, BASELINE, PENALTY = "None",
COVIMPUTEFUNCTION = NULL, COVIMPUTEINITIALIZE = NULL,
UNEQUALCENSIMPUTE = NULL, POSTITER = 5)
|
fit |
Multistate cure model fit from MultiCure |
bootnum |
Number of bootstrap samples used for each imputed dataset |
datWIDE |
A data frame with the following columns:
|
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). |
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. Right now, the options are 'None' (no variable selection), 'Ridge' (ridge regression for all covariates in all models) and 'Lasso' (lasso for all covariates in all models, only implemented for Cox baseline hazards) |
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 XXXXXX 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 XXXXXX 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 exist, but this could also be a user-specified function. Inputs and outputs must match default versions. |
POSTITER |
This variable indicates the number of post-processing steps that should be done. The default is 5. |
This function provides parameter estimates and estimated variances. The parameter estimates are obtained using Rubin's rules, but an alternative estimate of the multistate cure model parameter can be obtained by averaging the parameter estimates from the last few iterations of the model fitting algorithm. In our experience, we found that the approach that averages across the last few iterations (rather than estimated using Rubin's rules) provides a better estimate of the parameter of interest.
OUT a matrix containing the following:
Estimate an estimate of the multistate cure model parameter from Rubin's Rules
Variance an estimate of variance of the the multistate cure model parameter from Rubin's Rules
v The estimated degrees of freedom of the t-distribution of the parameter estimate from Rubin's Rules
1 2 3 4 5 6 7 | attach(SimulateMultiCure(type = "UnequalCensoring"))
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", IMPNUM = 10) ### Note: This will take a moment
OUT = VarianceMCEM_NOBOOT(fit,datWIDE, CovImp = Proper[[1]], GImp = Proper[[2]], YRImp = Proper[[3]], deltaRImp = Proper[[4]], ASSUME = "SameHazard", TransCov, BASELINE = "weib")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.