Question: survival analysis using R
0
gravatar for rsabrina93
2.6 years ago by
rsabrina9310
rsabrina9310 wrote:

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.

survival analysis R • 1.2k views
ADD COMMENTlink modified 2.6 years ago by sysbiocoder170 • written 2.6 years ago by rsabrina9310
1
gravatar for sysbiocoder
2.6 years ago by
sysbiocoder170
sysbiocoder170 wrote:

Try this

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

ADD COMMENTlink modified 2.6 years ago • written 2.6 years ago by sysbiocoder170

thank you @sysbiocoder it worked.

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

ADD REPLYlink written 2.6 years ago by rsabrina9310
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1659 users visited in the last hour