I have normalized expression values of some genes in 76 patients and the how many days they have survived from their diagnosis with cancer like below
Survival days MTHFD1 SH3PXD2A CAV1 ACTB COL5A2 CDKN2C BAG3 RALA DST STEAP1 FZD1 IGFBP2 RBP1
GSM482796 1450 -0.538 0.261 0.368 0.671 0.194 -0.43 -0.179 0.551 -0.117 0.18 -0.527 -0.703 -0.0586
GSM482797 936 -0.209 0.097 -0.9 -0.307 0.0873 -0.516 -0.211 0.089 -0.0729 -0.0546 -0.132 -0.481 0.0215
GSM482798 936 -0.487 0.0853 -0.518 0.162 0.0326 -0.264 -0.0957 0.237 -0.0855 -0.243 -0.137 0.0581 0.11
GSM482799 2060 -0.355 0.0949 -0.198 0.232 0.0123 -0.506 0.0424 0.0626 0.128 0.0602 -0.538 -0.0969 0.277
GSM482800 2574 -0.547 0.0836 -0.81 -0.211 0.0928 -0.536 -0.301 0.126 -0.327 0.129 -0.251 0.536 0.02
GSM482801 2313 -0.484 -0.333 -1.13 0.312 -0.0508 -0.848 -0.0893 0.164 -0.15 -0.2 -0.85 0.0732 0.12
GSM482802 176 -0.343 0.194 1.29 0.436 0.221 -0.717 0.0727 0.65 1.29 0.857 0.00985 -0.384 0.289
GSM482803 NA -0.623 0.176 -0.581 0.341 -0.0391 -0.446 -0.00736 -0.0541 -0.157 -0.197 -0.349 0.304 0.26
GSM482804 1327 -0.381 0.0195 -0.939 0.024 0.0151 -0.513 0.832 -0.055 0.0195 0.431 -0.673 -0.521 0.0575
GSM482805 1575 -0.167 0.0854 -0.411 0.0854 0.105 -0.296 0.101 0.31 0.798 -0.12 -0.152 0.119 0.142
GSM482806 687 -0.439 -0.0619 -1.06 0.0728 0.0771 -0.155 -0.232 0.164 -0.0181 0.196 0.449 0.748 -0.0259
GSM482807 736 -0.744 -0.191 -1.37 0.148 0.0684 -0.698 -0.292 0.187 -0.0628 -0.396 -0.598 -0.488 0.0977
GSM482808 816 -0.607 -0.194 -0.358 0.0134 0.159 -0.26 0.0238 -0.374 0.555 0.274 0.358 -0.0953 0.171
GSM482809 253 -0.354 0.121 -1.22 0.402 -0.0781 -0.699 -0.159 0.345 -0.0888 0.0523 -0.888 -0.759 0.0681
GSM482810 477 -0.607 -0.201 -1.05 0.551 -0.0554 -0.655 -0.148 -0.0741 -0.78 -0.31 -0.716 -0.154 0.0134
GSM482811 1035 -0.516 0.346 -0.62 0.0466 0.0884 -0.244 0.107 0.101 0.807 0.473 0.291 -0.417 0.0251
GSM482812 1984 -0.281 -0.0653 -0.917 0.255 -0.0167 -0.683 -0.0696 0.559 -0.175 -0.253 -0.458 -0.536 0.0461
GSM482813 2045 -0.42 0.0355 -0.792 0.513 0.158 -0.245 0.514 0.184 -0.211 -0.364 -0.573 0.183 0.049
EDITED
I have taken mean of the expression values for each patient and I have how many days each patient survived since diagnosis as below
> head(km)
samples time gene
1 GSM482796 1450 -0.11931980
2 GSM482797 936 -0.12209097
3 GSM482798 936 -0.10390257
4 GSM482799 2060 -0.07646939
5 GSM482800 2574 -0.16656837
6 GSM482801 2313 -0.12507939
>
I done so but nothing I got
> fit <- survfit(Surv(time) ~ gene, data = km)
> print(fit)
Call: survfit(formula = Surv(time) ~ gene, data = km)
n events median 0.95LCL 0.95UCL
gene=-0.333140816 1 1 859 NA NA
gene=-0.307846735 1 1 347 NA NA
gene=-0.303559694 1 1 1339 NA NA
gene=-0.290518776 1 1 61 NA NA
The question is if these genes increase survival time or not but likely I am doing wrong
By your help
> fit <- coxph(Surv(time) ~ gene, data = km)
> print(fit)
Call:
coxph(formula = Surv(time) ~ gene, data = km)
coef exp(coef) se(coef) z p
gene 0.8664 2.3783 1.4520 0.597 0.551
Likelihood ratio test=0.35 on 1 df, p=0.5543
n= 69, number of events= 69
For plotting I guess I do need another information because
library("survminer")
> ggsurvplot(fit, data = km)
Error in ggsurvplot(fit, data = a) : object 'ggsurv' not found
Any help please?
Thanks