drizopoulos / JMbayes

Joint Models for Longitudinal and Survival Data using MCMC
59 stars 24 forks source link

problem running fuction mvJointModelBayes() in JMBayes package #98

Closed amirabadiza921 closed 5 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) MixedModelFit2 <- mvglmer(list(logTSH ~ time + (time| id)), data = dataLong, families = list(gaussian)) Forms <- list("logTSH" = "value","logTSH" = list(fixed = ~ 1, random = ~ 1, indFixed = 2, indRandom = 2, name = "slope"))

JMFit2 <- mvJointModelBayes(MixedModelFit2,model.cox, timeVar="time",Formulas = Forms) summary(JMFit2)

Error in Zi*bi: non-conformable arrays Thanks,

drizopoulos commented 5 months ago

Try JMbayes2.