VarianceEM: VarianceEM

Description Usage Arguments Value Examples

View source: R/VarianceEM.R

Description

The function VarianceEM performs variance estimation for the Multistate Cure Model when the model is fit using the EM Algorithm. Variances are estimated by fitting the multistate cure model (via EM) to bootstrap samples of the data.

Usage

1
2
VarianceEM(fit, iternum, bootnum, datWIDE, Cov, ASSUME, TransCov, BASELINE,
  PENALTY = "None")

Arguments

fit

Multistate cure model fit from MultiCure

iternum

Number of iterations of the EM algorithm to apply to each bootstrap sample

bootnum

Number of bootstrap samples

datWIDE

A data frame with the following columns:

  • 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 cure status

Cov

A matrix containing the covariates

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

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)

Value

OUT a matrix containing the following:

Examples

1
2
3
4
5
6
7
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") 
OUT = VarianceEM(fit,iternum=20, bootnum=50, datWIDE, Cov, ASSUME = "SameHazard", TransCov, BASELINE = "weib")

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