rec2Ssurv: Create an ROC curve for recurrent event data that meets...

View source: R/2SSPrecur.R

rec2SsurvR Documentation

Create an ROC curve for recurrent event data that meets exchangeability assumption for a clinical trials.

Description

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

Usage

rec2Ssurv(
  id,
  episode_j,
  time,
  group,
  mi,
  checkPH = FALSE,
  xlab = NULL,
  ylab = NULL,
  main = NULL,
  cex.axis = 1.5,
  cex.lab = 1.5,
  legend.inset = 0.02,
  legend.cex = 1.5,
  lty = c(2, 1, 3),
  lwd = 1.5
)

Arguments

id

Unique identifier for each participant.

episode_j

Vector identifying the event number (j=1,..., m_i) for each partipant.

time

Gap time (Y_ij)

group

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

mi

Vector with number of episodes/recurrences each participant experienced.

checkPH

Logical argument to indicate if user wants to compare the nonparametric two sample survival curve with a proportional hazards model based curve (default is FALSE).

xlab

String argument for the horizontal axis label of the ROC curve.

ylab

String argument for the vertical axis label of the ROC curve.

main

String argument for the title of the ROC 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 the inset of the legend.

legend.cex

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

lty

Optional graphical parameter to set the type of line 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

The methods avaiable are "restrict" or "complete"

Value

A plot of the ROC curve (if silent=FALSE) and an ROCsurv object containing:

  • A survfit object containing the survival curve for the treatment group.

  • A survfit object containing the survival curve for the control group.

  • The area under the curve for the ROC in the given plot.


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