STATEOCCUPANCYCOX_NOIMP: STATEOCCUPANCYCOX_NOIMP

Description Usage Arguments Examples

View source: R/STATEOCCUPANCYCOX_NOIMP.R

Description

This function uses RShiny to plot predicted state occupancy probabilities, overall survival probabilities, event-free probabilities, and the transition cumulative hazards for a particular set of covariate values. These probabilities are estimated based on a Multistate cure model fit with COX baseline hazards fit using the EM algorithm. The estimated probabilities can incorporate only baseline information OR can incorporate baseline information and some followup information after baseline. This function cannot be applied for prediction when recurrence time is included in the model from recurrence to death.

Usage

1
2
STATEOCCUPANCYCOX_NOIMP(times, TransCov, newCov, beta, alpha, Haz_13,
  Haz_24, Haz_14, Haz_34)

Arguments

times

number of iterations for the EM or MCEM algorithm

TransCov

a list with elements: Trans13, Trans24, Trans14, Trans34, PNonCure. Each list element is a vector containing the names of the variables in newCov 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 newCovariates for the logistic regression for P(NonCure).

newCov

A dataframe with columns corresponding to newCovariates used in the model fit. The rows should correspond to the newCovariate values for which we will make our predictions.

beta

Estimate from multistate cure model fit

alpha

Estimate from multistate cure model fit

Haz_13

Estimate of the cumulative baseline hazard for the 1->3 transition. This is estimated using function BaselineHazard_NOIMP.

Haz_24

Estimate of the cumulative baseline hazard for the 2->4 transition. This is estimated using function BaselineHazard_NOIMP.

Haz_14

Estimate of the cumulative baseline hazard for the 1->4 transition. This is estimated using function BaselineHazard_NOIMP.

Haz_34

Estimate of the cumulative baseline hazard for the 3->4 transition. This is estimated using function BaselineHazard_NOIMP.

shape

Estimate from multistate cure model fit

Examples

1
2
3
4
5
6
7
8
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 = "cox")
Haz = BaselineHazard_NOIMP(datWIDE, Cov, beta = fit[[1]], alpha = fit[[2]], TransCov, ASSUME = "SameHazard", p = fit[[5]][,100])	
STATEOCCUPANCYCOX_NOIMP(times = seq(0,100,1), TransCov, newCov = data.frame(X1 = 0, X2 = 0), beta = fit[[1]], alpha = fit[[2]], Haz_13 = Haz[[1]], Haz_24 = Haz[[2]], Haz_14 = Haz[[3]], Haz_34 = Haz[[4]])  

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