Hi all,
I want to do survival analysis of clinical data but I am not sure about censoring TCGA clinical data? I have ''daysto_lastfollowup", "daysto_death", "vital status" and "overall_survival_months". What I did is
Method 1:
daysToEvent <- rep(NA, nrow(tcgaClinical))
daysToEvent[vitalStatus == "Alive"] <- daysToLastFollowup[vitalStatus == "Alive"]
daysToEvent[vitalStatus == "Dead"] <- daysToDeath[vitalStatus == "Dead"]
eventStatus <- rep(NA, nrow(tcgaClinical))
eventStatus[vitalStatus == "Alive"] <- 1
eventStatus[vitalStatus == "Dead"] <- 0
tcgaOS <- Surv(daysToEvent/30, eventStatus == 0)
rownames(tcgaOS) <- rownames(tcgaClinical)
Or
Method 2:
eventStatus <- rep(NA, nrow(tcgaClinical))
eventStatus[vitalStatus == "Alive"] <- 1
eventStatus[vitalStatus == "Dead"] <- 0
tcgaOSM <- Surv(tcgaClinical$OS_MONTHS, eventStatus == 0)
rownames(tcgaOSM) <- rownames(tcgaClinical)
Which method makes more sense ? Thank you
That was helpful, Thank you