How do I create a Survival Object with the Surv() in R?



My dataset consists of more than 90% of Censored observations and 10 % of events in the observed duration. The problem I encountered while applying


was that the survival curve obtained never reached the 50% probability and it reached a 90% probability after a short span of time and went on like that for the rest of the duration.

But if I put


The survival curve looked normal with the curve reaching near 0 probability over time.

Now the problem arose when I was trying to find out individual probabilities on certain time instances and there I found that for a few observations, the probability increased to an extent and then reduced. But this is a clear anomaly?

My question is what is the interpretation statistically of


Also does this create a survival object same as if Event argument had been left as it is? In R Manual I could not find enough reference but I could find references where Surv(Time,Event==1) is taken to analyse the data where Event has occurred

Let us give you some context:

library() # see the list of available packages
library(survival) # load it. You can also
# click the pull-down manual for packages and load it.
library(help=survival) # see the list of available functions and data sets.
data(aml) # load the data set aml
aml # see the data
#stime <- c(2.2, 3, 8.4, 7.5,9.6,8.5,0.2,1.7,1,0.1)
#status <- c(1,0,0,0,0,0,0,0,0,0)
Surv(aml$time, aml$status==0)
coxfit1<-Coxph(Surv(time, status==0)~x, data=aml)
survfit(coxfit1)#Could be written like this `survfit(coxfit1, newdata=data.frame(x=1))` as well to obtain the survival function of a particular subject with specific covariate values (x = 1)

Now I want to obtain the individual probabilities at specific time instances t_1 and t_2


@chirantan05 I tried to run your code but getting the error "Error: unexpected ‘=’ " for the following code.


Please go through the revised/edited post.