cfc.pbasis: Cause-specific competing-risk survival analysis in...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/cfc_legacy.R

Description

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

Usage

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

Arguments

t1

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.

t2

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

probs

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

unity.tol

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.

diff.tol

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

diff.tol.policy

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

Details

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.

Value

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.

Author(s)

Mansour T.A. Sharabiani, Alireza S. Mahani

References

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

See Also

cfc.tbasis

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
## Not run: 

# prepare data for cause-specific competing-risk analysis
data(bmt)
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
library(survival)
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
plot(my.summ)


## End(Not run)

CFC documentation built on June 21, 2017, 5:03 p.m.