Skip to main content

Timeline for Doing plot with this data

Current License: CC BY-SA 4.0

14 events
when toggle format what by license comment
Oct 16, 2019 at 14:19 comment added haci fit <- survfit(Surv(Time, Status) ~ Gene, data = km), here the Status is not about your variable of interest, it is whether or not the event has happened. You can try fit <- survfit(Surv(Time) ~ Status, data = km). With this, you attempt to see the effect of your gene's expression categories, high and low specifically. BTW, it might be misleading to choose Status as a variable name for the categories of your gene.
Oct 11, 2019 at 13:41 comment added Zizogolu Sorry I have a categorical column to data for visualization in my main post but I am getting error
Oct 11, 2019 at 11:43 comment added haci For the KM curves, you should use categorical data, so your options are using i) survfit (with categories of your variable) for Cox and KM or ii) coxph with your continuous variable for Cox and survfit with categories of your data for KM.
Oct 11, 2019 at 11:30 vote accept Zizogolu
Oct 11, 2019 at 11:28 comment added haci And regarding lack of patient status in your dataset, without that info, the model assumes an event has happened for all, the following is from ?Surv: Although unusual, the event indicator can be omitted, in which case all subjects are assumed to have an event. That is why you are not getting an error but please pay attention to the consequences of this assumption on your results.
Oct 11, 2019 at 11:22 history edited haci CC BY-SA 4.0
added 230 characters in body
Oct 11, 2019 at 11:21 comment added haci Can you try fit <- coxph(Surv(time) ~ gene, data = km) instead of fit <- survfit(Surv(time) ~ gene, data = km)? coxph seems to be way when using continuous variables. I am adding a link to the answer so it does not get lost here int the comments.
Oct 11, 2019 at 11:03 comment added Zizogolu Sorry because I don't know if these patients alive/dead; All I know is survival days from GSE19417 accession :(
Oct 11, 2019 at 10:54 comment added haci The survival object should be created with time and status/event (i.e. if the patient is dead/alive) like Surv(time, status), you lack the status variable in your data.
Oct 11, 2019 at 10:30 comment added Zizogolu Sorry I edited my question because I faced a problem
Oct 11, 2019 at 9:27 comment added haci In a scenario where you have a "gene module", yes. Basically you would be creating a new variable (mean expression of your module genes) and use this in your Cox regression. If the aim would be looking at the synergistic effects of genes to survival, that is a whole different story for which you would need to use interaction terms in your Cox regression.
Oct 11, 2019 at 9:11 comment added Zizogolu Thank you but I have about to 130 genes here for which I want to know if they together are related to survival or not; So should I take mean of their expression?
Oct 11, 2019 at 9:10 vote accept Zizogolu
Oct 11, 2019 at 10:33
Oct 10, 2019 at 17:09 history answered haci CC BY-SA 4.0