TwoSCI: Create a two-sample cumulative incidence curve for data from...

View source: R/2SCI.R

TwoSCIR Documentation

Create a two-sample cumulative incidence curve for data from randomized controlled trials.

Description

This function creates a two-sample cumulative incidence curve for data from randomized controlled trials and has an option to diagnose the proportional hazard assumption.

Usage

TwoSCI(
  time,
  event,
  group,
  maxt = NULL,
  xlab = NULL,
  ylab = NULL,
  main = NULL,
  rlabels,
  cex.axis = 1.5,
  cex.lab = 1.5,
  lwd = 1.5,
  silent = FALSE,
  lty = c(2, 3, 1),
  legend.inset = 0.02,
  legend.cex = 1.5,
  checkFG = FALSE,
  CI = FALSE,
  level = 0.95,
  B
)

Arguments

time

Time to an event of any kind or to censoring.

event

An indicator vector with values of 0, 1, 2, ..., M indicating one of M possible causes for an event for an participant that had an event occur 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.

maxt

Duration of the trial.

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.

rlabels

A vector with M strings to label the curves related to each of the M causes for events.

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.

lwd

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

silent

Logical argument, FALSE indicates the user wants plots and TRUE indicates no plots only calculations (default is FALSE).

lty

Optional graphical parameter to set the type of line to use. Can be a number or a vector. 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.

checkFG

Logical argument to indicate if the user wants to compare the nonparametric curve with the curve based on the Fine-Gray model (default is FALSE).

CI

Optional logical argument to indicate if the user wants a bootstrap confidence interval for the curves and the concordance.

level

A numerical argument to indicate the confidence level for the confidence interval. Default = 0.95.

B

The number of bootstrap samples to use for the confidence interval. Default = 1000.

Value

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

  • A Cuminc object containing survival and cummulative incidence estimates and corresponding standard errors for each group.

  • List with the two-sample cumulative incidence curves C_u for each risk type.


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