Learn R Programming

mets (version 0.2.5)

lifetable: Life table

Description

Creat simple life table

Usage

lifetable(time, status, entry, strata = list(),
    breaks = c(), confint = FALSE)

Arguments

time
Time (or matrix with columns time,status or entry,time,status)
status
status (event=TRUE,censoring=FALSE)
entry
Entry time
strata
Strata
breaks
Time intervals
confint
If TRUE 95 calculated

Examples

Run this code
library(timereg)
data(TRACE)
with(TRACE, lifetable(cbind(time,status==9),breaks=c(0.2,0.5),confint=TRUE))
d <- with(TRACE, lifetable(time,status==9,strata=list(sex=sex,vf=vf),breaks=c(0.2,0.5)))
summary(glm(events ~ offset(log(atrisk))+interval+sex+vf,data=d,poisson))

Run the code above in your browser using DataLab