Bug in survfitJM results in error in aucJM
In survfitJM:
lapply(last.time, function (t) survTimes[survTimes > t]) should be lapply(last.time, function (t) survTimes[survTimes >= t]).
This results in predictions not been made when the time of prediction is equal to the observed event time of the subject. Moreover, this bug in survfitJM leads to an error in aucJM when the time horizon corresponds to some subject observed event time.
Thanks for reporting. I'll have a look.
BTW, it would be better to use the newer JMbayes2 package.
From: Caterina Gregorio @.> Sent: Wednesday, October 13, 2021 11:50 PM To: drizopoulos/JMbayes @.> Cc: Subscribed @.***> Subject: [drizopoulos/JMbayes] Bug in survfitJM results in error in aucJM (#87)
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.
In survfitJM:
lapply(last.time, function (t) survTimes[survTimes > t]) should be lapply(last.time, function (t) survTimes[survTimes >= t]).
This results in predictions not been made when the time of prediction is equal to the observed event time of the subject. Moreover, this bug in survfitJM leads to an error in aucJM when the time horizon corresponds to some subject observed event time.
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%2F87&data=04%7C01%7Cd.rizopoulos%40erasmusmc.nl%7C21fc5ccf35074424147408d98e935b8e%7C526638ba6af34b0fa532a1a511f4ac80%7C0%7C0%7C637697585829128595%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=PMrqz8XwoVets0RYxVb4Dz4khdRoAAHGOISSK8ZRveM%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FADE7TT2EZQ44RVME7LXMSATUGX5HFANCNFSM5F6GJBRA&data=04%7C01%7Cd.rizopoulos%40erasmusmc.nl%7C21fc5ccf35074424147408d98e935b8e%7C526638ba6af34b0fa532a1a511f4ac80%7C0%7C0%7C637697585829138552%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=5BhY91VhTtuUhJUXYwIxF2ydqOwK%2B8o6o4Wlcxn6s5g%3D&reserved=0.
Thank you very much. The only reason I am still using this package is that if I understood well the newer version does not allow to add a non-linear effect for the biomarker in the survival model yet.
Thank you again, Best regards
It is possible in the current GitHub version.
lmeFit <- lme(log(serBilir) ~ ns(year, 3, B = c(0, 14.5)) * sex, data = pbc2, random = ~ ns(year, 3, B = c(0, 14.5)) | id, control = lmeControl(opt = 'optim'))
pbc2.id$event <- as.numeric(pbc2.id$status != "alive") CoxFit <- coxph(Surv(years, event) ~ drug + age, data = pbc2.id)
Forms <- ~ value(log(serBilir)) + poly2(value(log(serBilir))) + poly3(value(log(serBilir)))
jointFit <- jm(CoxFit, lmeFit, time_var = "year", functional_forms = Forms) summary(jointFit)
From: Caterina Gregorio @.> Sent: Thursday, October 14, 2021 10:02 AM To: drizopoulos/JMbayes @.> Cc: Dimitris Rizopoulos @.>; Comment @.> Subject: Re: [drizopoulos/JMbayes] Bug in survfitJM results in error in aucJM (#87)
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.
Thank you very much. The only reason I am still using this package is that if I understood well the newer version does not allow to add a non-linear effect for the biomarker in the survival model yet.
Thank you again, Best regards
You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdrizopoulos%2FJMbayes%2Fissues%2F87%23issuecomment-943111159&data=04%7C01%7Cd.rizopoulos%40erasmusmc.nl%7Ccd6ff97052a647ef3d7e08d98ee8e203%7C526638ba6af34b0fa532a1a511f4ac80%7C0%7C0%7C637697953143178952%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=tbRuJ9zDUjkYrgTx8p32lPRJ9Q2q8ai%2Fsq%2BsxxDW7hE%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FADE7TT5QOGMBQC5VI2JHDSDUG2E67ANCNFSM5F6GJBRA&data=04%7C01%7Cd.rizopoulos%40erasmusmc.nl%7Ccd6ff97052a647ef3d7e08d98ee8e203%7C526638ba6af34b0fa532a1a511f4ac80%7C0%7C0%7C637697953143188905%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=c20vLVbVQQLi%2FQng7h91LAIIBcJe3cwz%2BPFGISjDg%2BU%3D&reserved=0.
That's really great! Thank you