VPC for repeated time to events

Hello everyone,

i am trying to learn Pumas and I was walking through the tutorial for TimeToEvent models ( Time To Event).

I came across some issues when it comes to simulating a RTTE model.

Can anyone kindly share how to go from estimating your model to making a VPC for time to first/second/third event?
The error i get when using the normal vpc function is:
subject cannot contain reset events when simulating tte data

Any help is kindly appreciated - thank you!

Medhat

Thanks for reporting this. Indeed, it looks like there is a bug in vpc for repeated time-to-event analyses. I have filed this in our issue tracker.

1 Like

Hi Andreas, is there a work around in getting VPCs for time to n number of events? Or to atleast simulate multiple times using a fitted model?

I’m sorry for the delay here. The issue fell off the radar. Currently when simulating time-to-event models, we have a separate function for this since in this case, you are drawing time which is different from how simobs usually works. This might be subject to change in the future. Another restriction, is that the subject should not contain any events since the events are being populated as part of the simulation. Hence, you might be able to simulation with something like

julia> newpop = simobstte(ft.model, [Subject(sub, events=nothing) for sub in ft.data], coef(ft); maxT = maximum(sub -> maximum(sub.time), ft.data), repeated = true)
Population
  Subjects: 120
  Observations: DV