| cif2.ks {surv2sample} | R Documentation |
Compares cumulative incidence functions (CIF) for one failure cause in two samples of censored competing risks data using the Kolmogorov–Smirnov-type test.
cif2.ks(x, group, cause = 1, nsim = 2000, nsim.plot = 50)
x |
a "Survcomp" object, as returned by the
Survcomp function. |
group |
a vector indicating to which group each observation belongs. May contain values 1 and 2 only. |
cause |
For which cause of failure should the CIFs be compared? |
nsim |
the number of simulations to approximate the p-value. Must be positive. |
nsim.plot |
the number of simulated paths of the test process
to be returned (for possible plotting). Must be at most nsim. |
The test compares cumulative incidence functions F_1(t,k), F_2(t,k) for a particular failure cause k.
The test statistic is the maximum absolute difference of the two cumulative incidence functions. Its asymptotic distribution is complicated, therefore the martingale-based simulation approximation is employed. See Lin (1997).
A list with class attributes "cif2.int" and "lwy.test",
with components:
stat |
the test statistic. |
pval.sim |
the simulation based p-value. |
test.process |
the test process (difference of the two CIFs). |
test.process.sim |
simulated paths of the test process
(a matrix with nsim.plot columns). |
time |
sorted times. |
Further components are cause, nsim, nsim.plot, the same
as on input.
David Kraus (http://www.davidkraus.net/)
Lin, D. Y. (1997) Non-parametric inference for cumulative incidence functions in competing risks studies. Stat. Med. 16, 901–910.
See the plot method inherited from
the class "lwy.test".
See cif and plot.cif for estimation and
plotting of CIFs, cif2.int, cif2.logrank and
cif2.neyman for other two-sample tests.
## bone marrow transplant data
data(bmt1)
## compare CIFs for cause 1 (relapse)
## print results
print(a <- cif2.ks(Survcomp(bmt1$time, bmt1$event), bmt1$donor,
cause = 1))
## plot the test process and simulated paths
plot(a)
## compare CIFs for cause 2 (death in remission)
## print results
print(a <- cif2.ks(Survcomp(bmt1$time, bmt1$event), bmt1$donor,
cause = 2))
## plot the test process and simulated paths
plot(a)