0

Is it possible to use gestate::event_prediction to predict event timing for a study with enrollment completed? event_prediction has a parameter for rcurve, which I am not sure how to input for a enrollment completed study. Here's is the example from the vignette, and I'm trying to implement the method for a study with enrollment completed. The plot looks funky, but not sure how to interpret it. Not really sure how to interpret the plot from plot_ep either. The observed line is ranges from ~140-160, but the data only has 121 event. Does the plot predict that target event of 165 will reached at around 14-15 months? I'm sure rcurve needs to be adjusted as well.

# From gestate::event_prediction vignette, how do I change this for a study that's completed enrollment?
recruit <- PieceR(matrix(c(rep(1,12),10,15,25,30,45,60,55,50,65,60,55,30),ncol=2),1)

# My sample data
lungdf <- mutate(lung, time = time/30.4375, status = ifelse(status == 1, 0, 1),
                 event = ifelse(time>=12, 0, status))

predictions <- event_prediction(data=lungdf, Time="time", Event="event", censoringOne=FALSE,type="Weibull", rcurve=recruit, max_time=60, cond_Events=NULL, cond_NatRisk=NULL,units="Months")

# Create the trajectory of events
maxtime <- 35
events <- c(130, 140, 150, 160)

plot_ep(predictions,trajectory="unconditional",which_PI="unconditional",max_time=maxtime,observed=events,target=165,max_E=200)

enter image description here

user2272972
  • 131
  • 1
  • 11

0 Answers0