| ciplot_by | R Documentation | 
This function helps create stratified ciplots quickly with
panel labels and Gray's tests for each plot.
ciplot_by(
  rhs = "1",
  event,
  data,
  by = NULL,
  single = TRUE,
  cencode = NULL,
  gy_test = TRUE,
  main = NULL,
  ylab = NULL,
  sub = NULL,
  groups_lab = NULL,
  fig_lab = NULL,
  col.ci = NULL,
  map.col = FALSE,
  time = NULL,
  add = FALSE,
  plot = TRUE,
  ...
)
| rhs | the right-hand side of the formula | 
| event | character string indicating the event; see details | 
| data | data frame to use | 
| by | optional character string of stratification variable | 
| single | logical; if TRUE, each level of by will be drawn in a separate window | 
| cencode | unique value of  | 
| gy_test | one of  | 
| main | title(s) of plot(s) | 
| ylab | y-axis label | 
| sub | sub-title displayed in upper left corner; should be a character
vector with length equal to the number of panels (i.e., the number of
unique values of  | 
| groups_lab | events table group labels; should be a character vector with length equal to the number of groups | 
| fig_lab | figure panel labels; should be a character vector with
length equal to the number of panels (i.e., the number of unique values of
 | 
| col.ci | color for individual curves or for all curves in a plot if
 | 
| map.col | logical; if  | 
| time | character string of the time variable (optional) | 
| add | logical; if  | 
| plot | logical; if  | 
| ... | additional arguments passed to  | 
Invisibly returns a list of cuminc2 object(s) used to
generate plot(s). If by was used, there will be a list element for
each unique value.
ciplot; cuminc2; cuminc
## basic usage: Surv(time, event) ~ 1
ciplot_by(time = 'futime', event = 'event', data = transplant)
## with groups: Surv(time, event) ~ group
ciplot_by('sex', time = 'futime', event = 'event',
          data = transplant)
ciplot_by('sex', time = 'futime', event = 'event',
          data = transplant, by = 'abo', single = FALSE)
par(mfrow = c(1, 2))
ciplot_by('sex', time = 'futime', event = 'event',
          data = transplant, by = 'sex', xlim = c(0, 1500),
          single = FALSE, events.total = 2100)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.