cfc.pbasis {CFC}R Documentation

Cause-specific competing-risk survival analysis in probability denomination


Constructing cumulative incidence and event-free probability functions from cause-specific survival times give for a fixed set of probabilities.


cfc.pbasis(t1, t2, probs, unity.tol = 1e-06, diff.tol = 0.01,
  diff.tol.policy = c("all", "mean"))



Multi-dimensional array containing survival times for cause 1 (i.e. exponential of the negative integral of hazard function). First dimension must correspond to probabilities at which times are calculated. Elements with same time, but distributed in the space of remaining dimensions, are treated independently. These diemensions can correspond, e.g., to observations or samples (in Bayesian frameworks). Survival times must be increasing along the first dimension.


Multi-dimensional array containing survival times for cause 2. See note for t1.


Probabilities for which survival times are provided in t1 and t2. Must begin at 1.0 and be decreasing.


Tolerance for difference of survival probability from 1.0 at time=0.0. In other words, we require that abs(probs[1] - 1.0) < unity.tol.


Tolerance for change in survival probabilities from one time point to the next. Large changes lead to higher errors during numerical integration.


If "mean", then average change in survival probabilities are compared to diff.tol. If "all", each values is compared. The latter is more strict.


For each 'row' of t1, and t2, all elements are processed independently. To combine the survival curves from corresponding elements of t1 and t2, we first form a 'comon denominator' time vector by combining the two time vectors and sorting the results (after removing duplicates). We limit the maximum value in the combined time vector to minimum of the the two maxima from each cause. Next, we use interpolation to find survival probabilities of each cause at all the time points in the combined time vector. Finally, we call the function cfc.tbasis.


If t1 and t2 are one-dimensional, a matrix with columns named "time", "ci1", "ci2" and "efp" is returned. For multi-dimensional arrays, a list is returned with one such matrix for each element of the consolidated dimension representing all but the first dimension of t1 and t2.


Mansour T.A. Sharabiani, Alireza S. Mahani


Mahani A.S. and Sharabiani M.T.A. (2019). Bayesian, and Non-Bayesian, Cause-Specific Competing-Risk Analysis for Parametric and Nonparametric Survival Functions: The R Package CFC. Journal of Statistical Software, 89(9), 1-29. doi:10.18637/jss.v089.i09

Prentice et al (1978). The analysis of failure times in the presence of competing risks. Biometrics, 541-554.

See Also



## Not run: 

# prepare data for cause-specific competing-risk analysis
bmt$status1 <- 1*(bmt$cause==1)
bmt$status2 <- 1*(bmt$cause==2)
f1 <- Surv(time, status1) ~ platelet + age + tcell
f2 <- Surv(time, status2) ~ platelet + age + tcell

# perform weibull regression on each cause independently
reg1 <- survreg(f1, bmt)
reg2 <- survreg(f2, bmt)

# predict times for given probabilities
# transpose predictions so that first dimension
# is time/probability (use first 50 observations for speed)
pvec <- seq(from=1.0, to = 0.1, length.out = 100)
pred1 <- t(predict(reg1, newdata = bmt[1:50,], p = 1-pvec, type = "quantile"))
pred2 <- t(predict(reg2, newdata = bmt[1:50,], p = 1-pvec, type = "quantile"))

# cause-specific competing risk analysis - probability mode
my.cfc <- cfc.pbasis(pred1, pred2, probs = pvec)

# calculating averages across observations (e.g. patients in the study)
my.summ <- summary(my.cfc)

# plotting average CI and event-free probability curves

## End(Not run)

[Package CFC version 1.2.0 Index]