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

Hello, I recommend you download clinical data from [cBioPortal](http://www.cbioportal.org/) instead of TCGA/GDC. If you download clinical data from cBioPortal you will see fields `Overall Survival (Months)` and `Overall Survival Status` thats what you need for OS(Overall survival) analysis.  

As OS the event is dead, so `alive` is censored data, you should give value `1` to `dead` and `0` to `alive`. However I recommend use `1` and `2`, give value `2` to `dead` and `1` to `alive`.  

Here, some tutorial may be useful for you:  
https://www.emilyzabor.com/tutorials/survival_analysis_in_r_tutorial.html#introduction  
https://www.datacamp.com/community/tutorials/survival-analysis-R  
http://www.sthda.com/english/wiki/survival-analysis-basics  