drizopoulos / JM

Joint Models for Longitudinal & Survival Data under Maximum Likelihood
34 stars 7 forks source link

problem running fuction jointModel() in JM package #43

Closed amirabadiza921 closed 10 months ago

amirabadiza921 commented 1 year ago

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,

drizopoulos commented 10 months ago

It is difficult to see why this error is produced without a reproducible example.