Survival analysis using R -


on running survival model using survival package encountered strange error message unable understand.

the error message

error in surv(time, event) : time , status different lengths 

the number of observations in each column used in model1 same.

> mydata3<-read.csv(file.choose()) > attach(mydata3) > event<-event > time<-time > x<-cbind(wdcl,age,sex) > ch<-coxph(surv(time,event)~x,method="breslow") 

thanks , regards.

you need specify formula correctly, adding arguments.

try this:

coxph(surv(time, event) ~ wdcl + age + sex, method="breslow", data = mydata3) 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -