MultiCure: MultiCure

Description Usage Arguments Details Value Examples

View source: R/MultiCure.R

Description

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.

Usage

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)

Arguments

iternum

number of iterations for the EM or MCEM algorithm

datWIDE

A data frame with the following columns (names must match):

  • Y_R, the recurrence event/censoring time

  • delta_R, the recurrence event/censoring indicator

  • Y_D, the death event/censoring time

  • delta_D, the death event/censoring indicator

  • G, the cure status variable. This takes value 1 for known non-cured, 0 for "known" cured and NA for unknown cur'e status

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:

  • 'SameHazard': Lambda_14(t) = Lambda_24(t)

  • 'AllSeparate': No restrictions on Lambda_14(t) and Lambda_24(t)

  • 'ProportionalHazard': Lambda_14(t) = Lambda_24(t) exp(beta0)

  • 'SameBaseHaz': Lambda^0_14(t) = Lambda^0_24(t), No restrictions on beta_14 and beta_24

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

Details

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.

Value

fit If BASELINE = 'weib', this is a list containing

If BASELINE = 'cox', this is a list containing

Examples

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") 

lbeesleyBIOSTAT/MultiCure documentation built on July 10, 2019, 5:27 a.m.