Home > Blockchain >  Why are my survival curves not displaying as stratified categories?
Why are my survival curves not displaying as stratified categories?

Time:11-01

First time poster so I hope I've enough information here.

I'm trying to show my survival curves in 4 categories. The analysis is stratified according to my 4 categories in survival tables, but the survival plots do not depict these 4 categories and instead show many different survival curves. What am I doing wrong here?

Survival curve

# categorise ADAMTS13 levels
TMAdata$ADAMTS13level.f<-cut(TMAdata$ADAMTS13level, 
                            breaks=c(0.0,10.0,40.0, 60.0,160.0),
                             labels=c('0-10.0',
                                      '10.1-40.0',
                                      '40.1-60.0',
                                      '60.1-160.0'))
summary(TMAdata$ADAMTS13level.f)

# use 10-40% ADAMTS13 level as reference point
TMAdata$ADAMTS13level.f = relevel(TMAdata$ADAMTS13level.f, ref="10.1-40.0")

# platelet recovery according to ADAMTS13 level (reference point is 10.1-40.0)

    pltrecovery_ADAMTS13_table <- survfit(Surv(TMAdata$Daysplateletrecovery, TMAdata$Recoveredplatelets)~TMAdata$ADAMTS13level.f)
    summary(pltrecovery_ADAMTS13_table)

    plot(pltrecovery_ADAMTS13_table, conf.int=0, 
     xlab = "Days", 
     ylab = "Probability of not achieving platelet count =>150")
     legend("topright", inset=0.03,
            c("0-10.0",
              "10.1-40.0",
              "40.1-60.0",
              "60.1-160.0"),
            lty=1:2,
            lwd=2,
            cex=1)

CodePudding user response:

The extra lines are confidence boundaries. Specifying conf.int=0 does not suppress confidence interval plotting. That's arguably incorrect with it's easy to demonstrate using the first example in ?survfit.formula. If you don't want the confidence boundaries, then leave out the conf.int parameter all-together.

The legend will only have two types of lines and they probably won't match the types of the survival plotted.

  • Related