Question: question about survival analysis
gravatar for tujuchuanli
12 months ago by
tujuchuanli50 wrote:

Hi, I want to perform survival analysis on TCGA dataset. I use “survival” package in R to do it. For each gene, the equation for the model is “coxph(Surv(time,censor) ~ exprs)”, where time is survival time (for dead patients) or last follow up time (for alive patients), censor is dead or alive (alive=0 and dead=1) for each cancer sample, and exprs is the gene expression value. I have about 1000 genes. So I do it for 1000 times.

I also try almost the same equation just changing censor from “alive=0 and dead=1” to “alive=1 and dead=0”. The p-value changes a lot. The number of significant genes is almost the same. But the overlapping of significant genes for these two options is quite small (~30%).

From my understanding, the code for alive or dead cannot affect anything. However, why does it affect the result?

survival analysis • 415 views
ADD COMMENTlink modified 12 months ago • written 12 months ago by tujuchuanli50

Did you read the help pages for coxph and Surv to see exactly how the variables passed to these should be encoded? At the console, type ?coxph and ?Surv. I even given an example here: Survival analysis with gene expression Be aware that there can be a World of difference between a number encoded as numeric and that coded as a factor.

ADD REPLYlink modified 12 months ago • written 12 months ago by Kevin Blighe51k

Thanks, Kevin I do read the help page of "?surv". It recommands alvie=0 and dead=1. I just want to know why. I am reading your post, Thanks~~

ADD REPLYlink written 12 months ago by tujuchuanli50

Hey again. I do not really see your point of view... I mean, the survival of the patient is critical to how the statistical calculations are performed. It is 'hard-coded' in the program to expect that alive=0 and dead=1. So, that is how you must encode them in your input data.

ADD REPLYlink written 12 months ago by Kevin Blighe51k

Thanks Kevin, you really help me a lot.

ADD REPLYlink written 12 months ago by tujuchuanli50
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 945 users visited in the last hour