survReport: Survival Report

Description Usage Arguments Details Examples

Description

Generate a survival report with Kaplan-Meier estimates,

Usage

1
2
3
4
5
6
7
  survReport(etime, event, treat, group = NULL,
    treat.group = NULL, data,
    ylabel = "Survival Probability",
    conf = c("bars", "bands", "none"), n = NULL,
    labels = NULL, previousActual = NULL, h = 4,
    append = FALSE, fileName = "trt",
    descrip = "treatment", ndescrip = "", ...)

Arguments

etime

character. Name of column with event time data.

event

character. Name of column with event status data.

treat

character. Name of column with treatment data.

group

character. Name of column with group data.

treat.group

character. Name of column with treatment group data.

data

data.frame. Data used for report.

ylabel

character. Passed to survplot.survfit as the ylab argument.

conf

character. See survplot.survfit.

n

numeric. See ldBands.

labels

character vector. See plot.ldBands.

previousActual

Passed as the second component to the actual argument in the plot.ldBands function.

h

numeric. Height of plot. Default is 4in. See setps.

append

logical. If ‘TRUE’ output will be appended instead of overwritten.

fileName

character. File name suffix.

descrip

character. Used in caption to describe the predictor of interest. The default is ‘treatment’.

ndescrip

character. Used in longcaption to provide further detail.

...

additional arguments, passed to survplot and ldBands.

Details

If both group and treat.group are present, plots will be generated for each level of group.

Examples

1
2
3
4
5
6
7
## Not run: 
  set.seed(47)
  mydata <- data.frame(time=sapply(round(rnorm(1000, 36, 5)), min, 36), treat=rep(0:1, each=500))
  mydata$event <- ifelse(mydata$time < 36, 1, 0)
  survReport("time", "event", "treat", data=mydata)

## End(Not run)

harrelfe/rreport documentation built on May 17, 2019, 2:48 p.m.