survival analysis using R
1
0
Entering edit mode
7.9 years ago
rsabrina93 ▴ 10

I want to add censored data info on my plot how to I do that

try_surv <- survfit(Surv(Survival,Vital_status)~ 1, conf.type="none") plot(try_surv, xlab="Survival", ylab="Survival Probability") I got a plot like this :

survival plot

I want the vertical lines on the curve to mark the censored data.

R survival analysis • 2.3k views
ADD COMMENT
1
Entering edit mode
7.9 years ago
sysbiocoder ▴ 180

Try this

plot(try_surv,mark.time=TRUE, xlab="Survival", ylab="Survival Probability")

ADD COMMENT
0
Entering edit mode

thank you @sysbiocoder it worked.

Is there a way to put the number of samples included in each curve on the plot?

ADD REPLY

Login before adding your answer.

Traffic: 1611 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6