km.est.table: Table for Kaplan-Meier Estimates

Description Usage Arguments Value Examples

View source: R/km.est.table.R

Description

Generate table from estimated survival probabilities by standard KM method for treatment, control and their difference. Require formattable package to run.

Usage

1
km.est.table(y,delta,treat,t)

Arguments

y

a numeric vector of observed time

delta

a factor vector of indicator for events

treat

a factor vector of indicator for treatment, 1 for treatment group, 0 for control group

t

a numeric vector of time points for estimation

Value

A table (formattable object) containing the estimated S(t) with standard deviation at each time point.

Examples

1
2
3
4
5
6
7
library(survival)
y <- as.matrix(gbsg$rfstime/(365.25/12))
treat <- data.matrix(gbsg$hormon)
delta <- as.matrix(gbsg$status)
t <- seq(0,80,2)

km.est.table(y=y,delta=delta,treat=treat,t=t)

kimihua1995/adjKMtest documentation built on Jan. 1, 2021, 7:20 a.m.