drizopoulos / JM

Joint Models for Longitudinal & Survival Data under Maximum Likelihood
34 stars 7 forks source link

Potential bug in survfitJM.jointModel.R #28

Closed liuxiangyu127 closed 3 years ago

liuxiangyu127 commented 3 years ago

Hi Dr. Rizopoulos,

In "survfitJM.jointModel.R" line 180, you may forget to add "Dalpha.new <- thetas.new$Dalpha".

BTW, I have another question about line 250 in "splinePHGH.fit.R". Based on the closed formula of sigma.hat, it should be the trace of Z'Zvb, why directly summing the matrix instead of summing the diagonal of the matrix?

Thanks, Xiangyu

drizopoulos commented 3 years ago

Thanks I will look for the first point, probably you’re right.

For the second one, if I remember well, this is because sum(diag(ZtZ %% vb)) is equal to sum(ZtZ vb).

—— Professor of Biostatistics Erasmus Medical Center Rotterdam The Netherlands


Από: Xiangyu Liu notifications@github.com Στάλθηκε: Sunday, January 17, 2021 3:45:41 AM Προς: drizopoulos/JM JM@noreply.github.com Κοιν.: Subscribed subscribed@noreply.github.com Θέμα: [drizopoulos/JM] Potential bug in survfitJM.jointModel.R (#28)

Hi Dr. Rizopoulos,

In "survfitJM.jointModel.R" line 180, you may forget to add "Dalpha.new <- thetas.new$Dalpha".

BTW, I have another question about line 250 in "splinePHGH.fit.R". Based on the closed formula of sigma.hat, it should be the trace of Z'Zvb, why directly summing the matrix instead of summing the diagonal of the matrix?

Thanks, Xiangyu

— 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%2FJM%2Fissues%2F28&data=04%7C01%7Cd.rizopoulos%40erasmusmc.nl%7Cd9c671b86230461310e908d8ba91fb9c%7C526638ba6af34b0fa532a1a511f4ac80%7C0%7C0%7C637464483445738243%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=W0sonlHalWHDQBrXYbhSuaFgEnU9GupdG6LMSK9r%2Fqs%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FADE7TT6GH357PDNKWUK3P2TS2JFNLANCNFSM4WFXWE7Q&data=04%7C01%7Cd.rizopoulos%40erasmusmc.nl%7Cd9c671b86230461310e908d8ba91fb9c%7C526638ba6af34b0fa532a1a511f4ac80%7C0%7C0%7C637464483445748192%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=L9KW6nlShDtxIpTOrqKhQhJvw50786GdaRVaMWjbs8k%3D&reserved=0.

liuxiangyu127 commented 3 years ago

Thanks for the prompt reply. That makes sense.