petsum: Print LaTeX event time summary

Description Usage Arguments Examples

Description

Wrapper for the etsum function that prints paragraphs of text in LaTeX

Usage

1
2
  petsum(data, response, group = 1, times = c(12, 14),
    units = "months")

Arguments

data

dataframe containing data

response

character vector with names of columns to use for response

group

string specifiying the column name of stratification variable

times

numeric vector of times you want survival time provbabilities for.

units

string indicating the unit of time. Use lower case and plural.

Examples

1
2
3
4
5
require(survival)
lung$sex<-factor(lung$sex)
petsum(lung,c("time","status"),"sex")
petsum(lung,c("time","status"))
petsum(lung,c("time","status"),"sex",c(1,2,3),"months")

Example output

Loading required package: reshape
Warning message:
no DISPLAY variable so Tk is not available 
Loading required package: survival
Using SR as value column.  Use the value argument to cast to override this choice

 \textbf{1: } There are 138 patients. There were 112 (81\%) events. The median and range of the follow-up times is 224 (11-1022) months. The KM median event time is 326.1 with 95\% confidence Interval (22.9,270). The first and last event times occurred at 11 and 883 months respectively. The 12 and 14 month probabilities of 'survival' and their 95\% confidence intervals are 97 (94-100) and 96 (92-99) percent. 

 \textbf{2: } There are 90 patients. There were 53 (59\%) events. The median and range of the follow-up times is 292.5 (5-965) months. The KM median event time is 455.9 with 95\% confidence Interval (32.9,426). The first and last event times occurred at 5 and 765 months respectively. The 12 and 14 month probabilities of 'survival' and their 95\% confidence intervals are 99 (97-100) and 99 (97-100) percent. 

 \textbf{} There are 228 patients. There were 165 (72\%) events. The median and range of the follow-up times is 255.5 (5-1022) months. The KM median event time is 376.3 with 95\% confidence Interval (19.7,310). The first and last event times occurred at 5 and 883 months respectively. The 12 and 14 month probabilities of 'survival' and their 95\% confidence intervals are 98 (96-100) and 97 (95-99) percent. 
Using SR as value column.  Use the value argument to cast to override this choice

 \textbf{1: } There are 138 patients. There were 112 (81\%) events. The median and range of the follow-up times is 224 (11-1022) months. The KM median event time is 326.1 with 95\% confidence Interval (22.9,270). The first and last event times occurred at 11 and 883 months respectively. The 1, 2 and 3 month probabilities of 'survival' and their 95\% confidence intervals are 100 (100-100), 100 (100-100) and 100 (100-100) percent. 

 \textbf{2: } There are 90 patients. There were 53 (59\%) events. The median and range of the follow-up times is 292.5 (5-965) months. The KM median event time is 455.9 with 95\% confidence Interval (32.9,426). The first and last event times occurred at 5 and 765 months respectively. The 1, 2 and 3 month probabilities of 'survival' and their 95\% confidence intervals are 100 (100-100), 100 (100-100) and 100 (100-100) percent. 

reportRx documentation built on May 2, 2019, 10:44 a.m.

Related to petsum in reportRx...