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
Post a Comment