plotKmHalfCL: Kaplan-Meier Estimates

Description Usage Arguments Details Examples

Description

For two strata, estimates the standard error of the difference in two Kaplan-Meier estimates at each value of times, and plots half-width of confidence level for the difference, centered at the midpoint of the survival estimates.

Usage

1
2
  plotKmHalfCL(fit, times, fun = function(x) x, offset = 0,
    lwd = 0.5, lty = 1)

Arguments

fit

survfit object. See survfit.formula.

times

numeric vector. Time value for each record.

fun

function. Function to plot estimates.

offset

numeric. Offset value to apply to ‘x’ coordinate points.

lwd

numeric. The line width, passed to lines.

lty

numeric. The line type, passed to lines.

Details

details

Examples

1
2
3
4
5
6
7
8
9
set.seed(20)
time <- rep(365, 50)
event <- rbinom(50, 1, 1/3)
time[event == 1] <- sample(365, sum(event == 1), replace=TRUE)
trt <- sample(1:2, 50, replace=TRUE)
require('rms')
fit <- survfit.formula(Surv(time, event) ~ trt)
survplot.survfit(fit)
plotKmHalfCL(fit, time)

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