Thanks a lot! convert the state to 1,2 does fix the problem! and yes It's always not clear for me how to set the proper survival time for TCGA data. I used to do it like: clinicalData %>% mutate(futime=ifelse(fustat=="Alive",days_to_last_followup,days_to_death)) and then use futime as censored time, but I found that days_to_last_followup could give out a better result. I checked out the links you provided, but still not completely understand the concept. So could you show me some simple lines about how to do this? many thanks.
coxph "an id statement is required for multi-state models" error
hi everyone, it keeps show me a error when I use "survival" package coxph() for multivariate survival analysis : Error in coxph(Surv(days_to_last_followup, fustat) ~ NRG3 + FSTL5 + ASTN2 + : an id statement is required for multi-state models .
my input data is:
id days_to_last_followup fustat NRG3 FSTL5 ASTN2
TCGA-3L-AA1B 154 Alive WT WT WT
TCGA-4N-A93T 8 Alive WT WT WT
TCGA-4T-AA8H 160 Alive WT WT WT
TCGA-5M-AAT4 0 Dead WT WT WT
and when i provide id for the coxph method:cox <- coxph(Surv(days_to_last_followup, fustat)~NRG3+FSTL5+ASTN2+MROH2B+ZNF43+COL4A4+AXIN2+SMARCA4+ADAM12+SYNE1+THSD7B, data =multiCox.input ,id =id) , there are no errors show up but I can't see gene names in cox result:
coef exp(coef) se(coef) robust se z Pr(>|z|)
1 0.29929 1.34890 0.80904 0.67471 0.444 0.657
2 0.03079 1.03127 0.57015 0.40335 0.076 0.939
3 -0.21452 0.80693 0.49745 0.39913 -0.537 0.591
4 -0.16062 0.85161 0.67287 0.64364 -0.250 0.803
5 0.31424 1.36922 0.81711 0.65210 0.482 0.630
what's wrong in my steps? thanks
• 34,351 views
•
link
1 answer
• 0 views
•
link
Log in to answer this question.