Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

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

$
0
0

@chirantan05 wrote:

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

Surv(Time,Event)

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

Surv(Time,Event=0)

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

Surv(Time,Event=0)

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)
basehaz(coxfit1)

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

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles