drizopoulos / JMbayes2

Extended Joint Models for Longitudinal and Survival Data
https://drizopoulos.github.io/JMbayes2/
78 stars 22 forks source link

Issues predicting event #59

Closed berithunsdieck closed 1 year ago

berithunsdieck commented 1 year ago

If I want to predict event probabilities for a fitted model with customized times (e.g. times=seq(t0, 100, length.out=10)), it yields to the error: Error in colCumsums(H[index == i, ]) : Argument 'dim.' must be an integer vector of length two.

Without the times-argument, the predict()-function works. It's independent from the number of longitudinal models I used for joint modeling. Do you have any idea how to solve this issue?

drizopoulos commented 1 year ago

predict(..., type = "event") is aimed for dynamic predictions; see here for examples: https://drizopoulos.github.io/JMbayes2/articles/Dynamic_Predictions.html