Examples for 'survival::transplant'


Liver transplant waiting list

Aliases: transplant

Keywords: datasets

### ** Examples

#since event is a factor, survfit creates competing risk curves
pfit <- survfit(Surv(futime, event) ~ abo, transplant)
pfit[,2]  #time to liver transplant, by blood type
Call: survfit(formula = Surv(futime, event) ~ abo, data = transplant)

                n nevent   rmean*
abo=A, death  325     21 164.9734
abo=B, death  103     10 202.4902
abo=AB, death  41      3 137.8293
abo=O, death  346     32 182.1075
   *restricted mean time in state (max time = 2055 )
plot(pfit[,2], mark.time=FALSE, col=1:4, lwd=2, xmax=735,
       xscale=30.5, xlab="Months", ylab="Fraction transplanted",
       xaxt = 'n')
temp <- c(0, 6, 12, 18, 24)
axis(1, temp*30.5, temp)
legend(450, .35, levels(transplant$abo), lty=1, col=1:4, lwd=2)
plot of chunk example-survival-transplant-1
# competing risks for type O
plot(pfit[4,], xscale=30.5, xmax=735, col=1:3, lwd=2)
legend(450, .4, c("Death", "Transpant", "Withdrawal"), col=1:3, lwd=2)
plot of chunk example-survival-transplant-1

[Package survival version 3.5-3 Index]