I've been able to plot a survival curve for my data using the following R code:
radiation=read.csv("radiation.csv",header=T)
head(radiation)
attach(radiation)
summary(Treatment)
library(splines)
library(survival)
log_rank=survdiff(Surv(radiation$Time)~radiation$Treatment)
log_rank
sfit<-survfit(Surv(radiation$Time)~radiation$Treatment)
plot(sfit,lty=c("solid","dashed"),col=c("red","green"),xlab="survival time in hours",ylab="survival probability")
title("Survival post lethal dose radiation")
legend("topright",c("GF","Placebo"),lty=c("solid","dashed"),col=c("red","green"))
What I'm stuck on now is how to find the x-value (time), when survival probability (y) is 50%.
Is there an R code for this?
Thanks!