drizopoulos / JMbayes2

Extended Joint Models for Longitudinal and Survival Data
https://drizopoulos.github.io/JMbayes2/
79 stars 23 forks source link

question JMbayes2 package #51

Closed amirabadiza921 closed 1 year ago

amirabadiza921 commented 1 year ago

Hi drizopoulos Should the JMbayes2 package have two longitudinal variables? The following codes, will their output be wrong? modelcox<- coxph(Surv(f.time,ckd)~gender+age+tg+fbs,data=data.wide,model=T) fil.lm<-lme(TSH~time,random=~time|id,data=dataLong) ffm<-list("TSH"=~value(TSH)+slope(TSH)) fit.jm<-jm(modelcox,fit.lm,functional_forms=ffm,time_var="time",n_iter=10000)

thanks

drizopoulos commented 1 year ago

Sorry, but I do not understand the question.

amirabadiza921 commented 1 year ago

Sorry, but I do not understand the question.

Is the model I have implemented correct? Because I only have a mixed effects model. package JMbayes2 only to allow models with more than one random effect.

drizopoulos commented 1 year ago

Indeed, in JMbayes2 you need to have more than one random effects.