drizopoulos / JMbayes

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

mvglmer() vs brm() #74

Closed mpirikL closed 3 years ago

mpirikL commented 4 years ago

Good day Dimitris, I am having an issue with mvglmer fitting a particular longitudinal model. In the particular model (see codes below), the mvglmer() using Stan as the engine does a terrible job of sampling the posterior, when it does not crash R, whereas brms has no problem. I was hoping that you could help me understand what might be causing the drastic differences in these two algorithms. Also, maybe I can convince you to perhaps open up JMBayes so that it can accept longitudinal submodels from other packages; I'd be more than willing to help on this task.

The particular call to mvglmer() is

mvglmer_fit=mvglmer(formulas = list(scaled_log_AVAbyBSA~start_time+ (start_time|id), scaled_log_AJV~start_time+ (start_time|id), EF_cat~start_time+ (start_time|id)), data=results4, engine = "STAN", families = list(gaussian,gaussian,binomial), control = list(n.chains=4, n.processors=4, n.iter=3000))

The call to brms is:

formula=mvbf(bf(scaled_log_AVAbyBSA ~ start_time + (start_time|p|id), family = gaussian()), bf(scaled_log_AJV ~ start_time + (start_time|p|id), family = gaussian()), bf(EF_cat ~ start_time + (start_time|p|id), family = bernoulli(link = "logit")))

brms_fit=brm(formula, data = results4, chains = 2, cores = 2, iter = 3000, control = list(adapt_delta = 0.9, max_treedepth = 15))

Thanks much for your help. L.W.

drizopoulos commented 4 years ago

My team and I are currently working on a new implementation of JMbayes, i.e., JMbayes2, that will not rely on STAN or JAGS anymore. Given this development, we are now focusing more on this package than upgrading JMbayes. The first version is expected to be ready somewhere in October.

From: mpirikL notifications@github.com Sent: Wednesday, September 9, 2020 12:55 AM To: drizopoulos/JMbayes JMbayes@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [drizopoulos/JMbayes] mvglmer() vs brm() (#74)

Good day Dimitris, I am having an issue with mvglmer fitting a particular longitudinal model. In the particular model (see codes below), the mvglmer() using Stan as the engine does a terrible job of sampling the posterior, when it does not crash R, whereas brms has no problem. I was hoping that you could help me understand what might be causing the drastic differences in these two algorithms. Also, maybe I can convince you to perhaps open up JMBayes so that it can accept longitudinal submodels from other packages; I'd be more than willing to help on this task.

The particular call to mvglmer() is

mvglmer_fit=mvglmer(formulas = list(scaled_log_AVAbyBSA~start_time+ (start_time|id), scaled_log_AJV~start_time+ (start_time|id), EF_cat~start_time+ (start_time|id)), data=results4, engine = "STAN", families = list(gaussian,gaussian,binomial), control = list(n.chains=4, n.processors=4, n.iter=3000))

The call to brms is:

formula=mvbf(bf(scaled_log_AVAbyBSA ~ start_time + (start_time|p|id), family = gaussian()), bf(scaled_log_AJV ~ start_time + (start_time|p|id), family = gaussian()), bf(EF_cat ~ start_time + (start_time|p|id), family = bernoulli(link = "logit")))

brms_fit=brm(formula, data = results4, chains = 2, cores = 2, iter = 3000, control = list(adapt_delta = 0.9, max_treedepth = 15))

Thanks much for your help. L.W.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdrizopoulos%2FJMbayes%2Fissues%2F74&data=02%7C01%7Cd.rizopoulos%40erasmusmc.nl%7Ca9217d6cbaec4e208dc508d8544a4632%7C526638ba6af34b0fa532a1a511f4ac80%7C0%7C0%7C637352025301209966&sdata=VgAKCwxmFHa7aphO32SyF6kG9EJLBjMzfGMALHVtmxU%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FADE7TTY7VSGQD7GSNZIFZETSE2Y5ZANCNFSM4RAT7PZQ&data=02%7C01%7Cd.rizopoulos%40erasmusmc.nl%7Ca9217d6cbaec4e208dc508d8544a4632%7C526638ba6af34b0fa532a1a511f4ac80%7C0%7C0%7C637352025301209966&sdata=Oiv5CQ%2F7LZO38whQcEq0zv80kTGNKwoBDawrqH9xpbQ%3D&reserved=0.