Question: question about survival analysis
0
gravatar for tujuchuanli
6 months ago by
tujuchuanli40
tujuchuanli40 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 • 284 views
ADD COMMENTlink modified 6 months ago • written 6 months ago by tujuchuanli40

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 6 months ago • written 6 months ago by Kevin Blighe42k

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 6 months ago by tujuchuanli40
1

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 6 months ago by Kevin Blighe42k

Thanks Kevin, you really help me a lot.

ADD REPLYlink written 6 months ago by tujuchuanli40
Please log in to add an answer.

Help
Access

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