drizopoulos / JMbayes

Joint Models for Longitudinal and Survival Data using MCMC
58 stars 23 forks source link

Multivariate joint model analysis #96

Closed LNUMAN closed 1 year ago

LNUMAN commented 1 year ago

Dear professor Rizopoulos,

I am using the JMbayes package to fit a JM combining a survival model and a linear mixed model for 1 or 2 specific biomarker(s). In the linear mixed model I am fitting the trajectory of a biomarker over time using a natural spline with a knot at 90.

When using the JointModelbayes for both the univariate analysis, the results are ok and interpretable. In contrast, when using the mvglmer function for the multivariate approach, the results seem weird (coefficients are much larger, and almost all p-values are 0, while in the univariate analysis they weren't). Also when using the mvglmer function for only one biomarker (univariate) it results in weird numbers.

Although unfortunately I cannot send my data and full script, hereby a summary of the code:

Univariate analysis: CoxFit<-coxph(Surv(Survival,Censoring) ~ Covariate1 + Covariate_2 + Covariate_3, data=df , model=TRUE, x=TRUE) LME_Biomarker1<-lme(Biomarker1 ~ ns(time,knots=90),data=table_biomarker, random = ~ ns(time, knots=90)|Study_ID, control = lmeControl (msMaxIter = 1000, msMaxEval = 1000)) JM_univariate<-JointModelBayes(LME_Biomarker1,CoxFit,timeVar="time")

Multivariate analysis using one biomarker: MVGLMER_Biomarker1<-mvglmer(list(Biomarker1 ~ ns (time,knots=90) + (ns(time,knots-90)|Study_ID) ), data = table_biomarker,families = list(gaussian) )

Multivariate analysis using one biomarker: MVGLMER_Biomarker1and2<-mvglmer(list(Biomarker1 ~ ns (time,knots=90) + (ns(time,knots-90)|Study_ID) log10(Biomarker2)~ns (time,knots=90) + (ns(time,knots=90)|Study_ID) ), data = table_biomarker,families = list(gaussian,gaussian) )

Is there a problem in my code or is there another issue? Very interested to hear your thoughts on this issue. Thank you in advance!

Best regards, Lieke Numan

drizopoulos commented 1 year ago

Try JMbayes2

From: LNUMAN @.> Sent: Tuesday, September 27, 2022 4:36 PM To: drizopoulos/JMbayes @.> Cc: Subscribed @.***> Subject: [drizopoulos/JMbayes] Multivariate joint model analysis (Issue #96)

Waarschuwing: Deze e-mail is afkomstig van buiten de organisatie. Klik niet op links en open geen bijlagen, tenzij u de afzender herkent en weet dat de inhoud veilig is. Caution: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

Dear professor Rizopoulos,

I am using the JMbayes package to fit a JM combining a survival model and a linear mixed model for 1 or 2 specific biomarker(s). In the linear mixed model I am fitting the trajectory of a biomarker over time using a natural spline with a knot at 90.

When using the JointModelbayes for both the univariate analysis, the results are ok and interpretable. In contrast, when using the mvglmer function for the multivariate approach, the results seem weird (coefficients are much larger, and almost all p-values are 0, while in the univariate analysis they weren't). Also when using the mvglmer function for only one biomarker (univariate) it results in weird numbers.

Although unfortunately I cannot send my data and full script, hereby a summary of the code:

Univariate analysis: CoxFit<-coxph(Surv(Survival,Censoring) ~ Covariate1 + Covariate_2 + Covariate_3, data=df , model=TRUE, x=TRUE) LME_Biomarker1<-lme(Biomarker1 ~ ns(time,knots=90),data=table_biomarker, random = ~ ns(time, knots=90)|Study_ID, control = lmeControl (msMaxIter = 1000, msMaxEval = 1000)) JM_univariate<-JointModelBayes(LME_Biomarker1,CoxFit,timeVar="time")

Multivariate analysis using one biomarker: MVGLMER_Biomarker1<-mvglmer(list(Biomarker1 ~ ns (time,knots=90) + (ns(time,knots-90)|Study_ID) ), data = table_biomarker,families = list(gaussian) )

Multivariate analysis using one biomarker: MVGLMER_Biomarker1and2<-mvglmer(list(Biomarker1 ~ ns (time,knots=90) + (ns(time,knots-90)|Study_ID) log10(Biomarker2)~ns (time,knots=90) + (ns(time,knots=90)|Study_ID) ), data = table_biomarker,families = list(gaussian,gaussian) )

Is there a problem in my code or is there another issue? Very interested to hear your thoughts on this issue. Thank you in advance!

Best regards, Lieke Numan

- Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdrizopoulos%2FJMbayes%2Fissues%2F96&data=05%7C01%7Cd.rizopoulos%40erasmusmc.nl%7Cff1b24e20ce54743264b08daa0959181%7C526638ba6af34b0fa532a1a511f4ac80%7C0%7C0%7C637998861496591078%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=feJDfD3TRT2SEanM9Mjn2u%2FysTkE5rYj4V%2FCr6VBSlI%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FADE7TT4I2HDO5S5WNQWT2B3WAMA4FANCNFSM6AAAAAAQW3HX4Q&data=05%7C01%7Cd.rizopoulos%40erasmusmc.nl%7Cff1b24e20ce54743264b08daa0959181%7C526638ba6af34b0fa532a1a511f4ac80%7C0%7C0%7C637998861496591078%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=TO8xS%2BPomv7cSATYbi2t%2BFqF1CDMV3wPaa6HMIVPlRc%3D&reserved=0. You are receiving this because you are subscribed to this thread.Message ID: @.**@.>>

LNUMAN commented 1 year ago

Great, thanks!