ABC.plot: Plot for area between the CIF curves

Description Usage Arguments Value Note References See Also Examples

View source: R/ComparisonCR.R

Description

A function used to plot the area between the CIF curves.

Usage

1
2
ABC.plot(time, status, group, tau=NULL, max.x=NULL, max.y=NULL, col=c(1,1,8),lwd=c(3,3)
         , lty=c(1,2), lab.x="Time", lab.y="CIF", cex.main=1.5, cex.lab=1.5, cex.axis=1.5)

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.

tau

The truncation time point for shading lines, which needs to be smaller than or equal to the maximum of time. When tau=NULL, the default value is used. See details in reference.

max.x

The maximum of x-axis. When the default NULL is used, the max.x is set to the max velue of time.

max.y

The maximum of y-axis. When the default NULL is used, the max.y is set to 1.

col

A vector of integers specifying colors for control group, treatment group, and shading lines, respectively. The default value is c("black","black","gray90").

lwd

A vector of numeric values of line widths for control group, treatment group, and shading lines, respectively.. The default value is c(3,3).

lty

A vector of integers specifying line types for control group, treatment group, and shading lines, respectively. The default value is c(1,2).

lab.x

Label given to the x-axis.

lab.y

Label given to the y-axis.

cex.axis

The magnification to be used for axis annotation relative to the current setting of cex.

cex.lab

The magnification to be used for x and y labels relative to the current setting of cex.

cex.main

The magnification to be used for main titles relative to the current setting of cex.

Value

None

Note

ABC.plot is based on plot function and polygon function.

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.

See Also

ABC

Examples

1
2
3
4
5
6
#get dataset from package
data(crossdata)
#
#get plot for ABC
ABC.plot(crossdata$time, crossdata$status, crossdata$group, col=c(1,1,"gray90"))
legend(0,1.02,c("group0","group1"), col=c(1,1), lty=c(1,2), lwd=c(3,3), cex=1.2, bty="n")

Example output



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