Closed BenGoudsmit closed 4 years ago
Unfortunately, without a Reproducible example I cannot see what is going wrong.
—— Dimitris Rizopoulos Professor of Biostatistics Erasmus University Medical Center The Netherlands
From: Ben notifications@github.com Sent: Wednesday, August 19, 2020 4:15:35 PM To: drizopoulos/JMbayes JMbayes@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [drizopoulos/JMbayes] Error aucJM and prederrJM for time-dependent cox model (#68)
Dear prof Rizopoulos,
With the JMbayes package, I can calculate AUCs and prediction errors for my joint models. Many thanks for your excellent work. However, when doing the same for a simple time-dependent Cox model, I get an aucJM error, and NA's for prederrJM. Due to my confidential data, I cannot provide a reprex.
Cox model: tdcox <- coxph(Surv(Tstart, Tstop, binstatus) ~ score+ variable A+ variable B + variable C + variable D, data = trainingdata)
AUC:
aucJM(tdcox, testdata, Tstart = 0.25, Dt = 0.25, timeVar = "years", respVar = "score", evTimeVar = "binstatus")
Error in outer(fit$cumhaz, c(x2)) - fit$xbar : non-conformable arrays
Prediction errors:
pred_err3mtest <- prederrJM(tdcox, testdata, Tstart = 0.25, Thoriz = 0.5, idVar = "id",timeVar = "years", respVar = "score", evTimeVar = "binstatus") pred_err3mtest[1] $prederr [1] NA
— 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%2F68&data=02%7C01%7Cd.rizopoulos%40erasmusmc.nl%7Ce50cbcc0758f4e05942008d8444a58eb%7C526638ba6af34b0fa532a1a511f4ac80%7C0%7C1%7C637334433392042808&sdata=5xOYDpQujANEd3EQlphTed%2B6ll4BfmsmNSH0mNmXtHA%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FADE7TT2RQXBXHJPGHRONDRDSBPNAPANCNFSM4QE7VOFQ&data=02%7C01%7Cd.rizopoulos%40erasmusmc.nl%7Ce50cbcc0758f4e05942008d8444a58eb%7C526638ba6af34b0fa532a1a511f4ac80%7C0%7C1%7C637334433392042808&sdata=Dg9Dflm3No864x65n26iSIiWualGxI7IaRRnsXaZw00%3D&reserved=0.
In the JMbayes package, aucJM of TDC does (partly) work. Two questions:
auc3m <- aucJM(JM,longtest,Tstart=0.25,Thoriz=0.50,idVar = "id") auc3m
Time-dependent AUC for the Joint Model JM
Estimated AUC: 0.7737 At time: 0.5 Using information up to time: 0.25 (4849 subjects still at risk)
aucJM(tdcox, longtest, Tstart = 0.25, Dt = 0.25, timeVar = "years", respVar = "score", evTimeVar = "binstatus")
Time-dependent AUC for the Cox Model tdcox
Estimated AUC: 0.9633 At time: 0.5 Using information up to time: 0.25 (757 subjects still at risk)
Dear prof Rizopoulos,
With the JMbayes package, I can calculate AUCs and prediction errors for my joint models. Many thanks for your excellent work. However, when doing the same for a simple time-dependent Cox model, I get an aucJM error, and NA's for prederrJM. Due to my confidential data, I cannot provide a reprex.
Cox model: tdcox <- coxph(Surv(Tstart, Tstop, binstatus) ~ score+ variable A+ variable B + variable C + variable D, data = trainingdata)
AUC:
Prediction errors: