TwoSSPmodifier: ROC when survival goes to 0 for either group

View source: R/2SSPmodifier.R

TwoSSPmodifierR Documentation

ROC when survival goes to 0 for either group

Description

ROC when survival goes to 0 for either group

Usage

TwoSSPmodifier(
  time,
  event,
  group,
  modifier,
  area = FALSE,
  mlabels,
  xlab,
  ylab,
  main,
  cex.axis = 1.5,
  cex.lab = 1.5,
  legend.inset = 0.02,
  legend.cex = 1.5,
  lty = c(1, 6),
  lwd = 1.5
)

Arguments

time

Time to event or censoring.

event

An indicator vector with values of 1 for individuals who had the event occurred or 0 if the participant was censored.

group

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

modifier

An indicator vector with values of 1 for a certain level of the modifier and 0 otherwise. Example: 0 for male and 1 for female.

area

Logical argument to indicate if user wants an estimate for area under the curve. Default is TRUE.

mlabels

A vector with two strings to label the levels of the modifier.

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.

Value

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

  • A list with two survfit objects for the treatment and control groups when the modifier=0.

  • A list with two survfit objects for the treatment and control groups when the modifier=1.

  • If area = TRUE, the areas under the curve for the two ROCs in the given plot.


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