TwoSSPdcens: Create an ROC curve for survival data from clinical trials.

View source: R/2SSPdcens.R

TwoSSPdcensR Documentation

Create an ROC curve for survival data from clinical trials.

Description

This function creates ROC curve for survival data from clinical trials and calculates the area under the curve.

Usage

TwoSSPdcens(
  o_l,
  o_r,
  e_l,
  e_r,
  group,
  maxtime = NULL,
  ctime = 99,
  dtype = NULL,
  xlab = NULL,
  ylab = NULL,
  main = NULL,
  cex.axis = 1.5,
  cex.lab = 1.5,
  legend.inset = 0.02,
  legend.cex = 1.5,
  lty = c(1, 2, 3),
  lwd = 1.5
)

Arguments

o_l

Time at the left of the interval (L,R] for the onset time (see details).

o_r

Time at the right of the interval (L,R] for the onset time (see details).

e_l

Time at the left of the interval (L,R] for the event time (see details).

e_r

Time at the right of the interval (L,R] for the event time (see details).

group

Indicator vector with values of 1 if the the participant was in the treatment arm and 0 otherwise.

maxtime

Maximum event time in the sample.

ctime

Last time an event could have been observed in the study (length of the study, must be higher than maxtime even if by 1 unit).

dtype

String argument that can take values "dcens" or "DIcens" to indicate either doubly censored or doubly interval censored data (see details).

xlab

String argument for the horizontal axis label of the curve.

ylab

String argument for the vertical axis label of the curve.

main

String argument for the title of the curve.

cex.axis

Optional graphical parameter for magnification of axis annotation. See par for more details.

cex.lab

Optional graphical parameter for magnification of x and y labels. See par for more details.

legend.inset

Optional graphical parameter controling legend inset.

legend.cex

Optional graphical parameter for magnification of a legend's text.

lty

Optional graphical parameter to set the type of lines to use. Can be a number or a vector. See par for more details.

lwd

Optional graphical parameter for line width relative to the default. See par for more details.

Details

For doubly censored data as discussed by Turnbull (dtype = "dcens"): Set o_l = NA and o_r = NA Set e_l = e_r if the event is exact Set e_l = -Inf if the event time is left censored and e_r = Inf if it is right censored

For doubly interval censored data (dtype = "DIcens) as discussed by De Gruttola and Legakos: Set o_l = o_r if the onset time is exact, o_l = -Inf if it is left censored, and o_r = Inf if it is right censored. Set e_l = e_r if the event time is exact, e_l = -Inf if it is left censored, and e_r = Inf if it is right censored.

Value

A plot of the ROC curve and an ROCsurv object containing:

  • R_u: Data frame with the estimated two-sample survival curves.

  • npmle0: NPMLE's (outcome and gap) for the untreated/unexposed group.

  • npmle1: NPMLE's (outcome and gap) for the treated/exposed group.


SandraCastroPearson/2SPcurves documentation built on June 15, 2022, 3:42 a.m.