ABC: Area between the CIF curves for competing risk data

Description Usage Arguments Value References Examples

View source: R/ComparisonCR.R

Description

Statistical inference of area between the CIF curves (ABC) test for competing risk data.

Usage

1
ABC(time, status, group, t0=0, tau=NULL)

Arguments

time

The followed up time for testing data.

status

The status indicator, should be coded as 0= censored, 1= event of interest, 2= all other competing events.

group

The group indicator for comparison, and the elements of this vector should take either 0 or 1. Normally, 0= control group, 1= treatment group.

t0

The start time point for testing, the default is set as t0=0 for overall test.

tau

The truncation time point for testing, which needs to be smaller than or equal to the minimum of the largest observed time in each of the two groups. When tau=NULL, the default value is used. See details in reference.

Value

t0

The start time point for testing.

tau

The truncation time point for testing.

delta

The alsolute difference of two cumulative incidence functions.

var(delta)

The variance of delta based on Aalen’s method.

statistic

The statistic of this test.

Pvalue

The P value of this test.

References

Lyu J, Chen J, Hou Y, Chen Z. Comparison of two treatments in the presence of competing risks. Pharmaceutical Statistics, 2020. DOI: 10.1002/pst.2028.

Examples

1
2
3
4
5
6
7
8
9
#get dataset from package
data(crossdata)
#
#overall test
ABC(crossdata$time, crossdata$status, crossdata$group)
#arbitary test for detecting difference after 2 years
ABC(crossdata$time, crossdata$status, crossdata$group, t0=2, tau=NULL)
#arbitary test for detecting difference between 2 years and 4 years
ABC(crossdata$time, crossdata$status, crossdata$group, t0=2, tau=4)

Example output

  t0 tau delta var.delta. statistic      Pvalue
1  0 4.6   0.6 0.01795187  2.621623 0.008751208
  t0 tau delta  var.delta. statistic   Pvalue
1  2 4.6 0.256 0.007352853  1.114455 0.265084
  t0 tau delta  var.delta. statistic    Pvalue
1  2   4 0.223 0.004108426  1.589351 0.1119812

ComparisonCR documentation built on July 1, 2020, 8:12 p.m.