I had this error when running
model.cox<-coxph(Surv(surv_time,incidenceDM)~sex15_1+age+FHD+ waist+fbs+bs2HR+BMI,data=data.cox,x=T,model=TRUE)
summary(model.cox)
fit.lm<-lme(logTSH~ time,random= ~time | code,data=dataLong)
summary(fit.lm)
dform<-list(fixed=~1,inFixed=2,random=~1,indRandom=2)
fit.JM<-jointModel(fit.lm,model.cox,timeVar="time",parameterization="both",derivForm =dform)
summary(fit.JM)
Error in tapply (Long.deriv,id,tail,1):
Arguments must have same length
Thanks,
I had this error when running model.cox<-coxph(Surv(surv_time,incidenceDM)~sex15_1+age+FHD+ waist+fbs+bs2HR+BMI,data=data.cox,x=T,model=TRUE) summary(model.cox) fit.lm<-lme(logTSH~ time,random= ~time | code,data=dataLong) summary(fit.lm) dform<-list(fixed=~1,inFixed=2,random=~1,indRandom=2) fit.JM<-jointModel(fit.lm,model.cox,timeVar="time",parameterization="both",derivForm =dform) summary(fit.JM) Error in tapply (Long.deriv,id,tail,1): Arguments must have same length Thanks,