Event Prediction
Overview
Predicts enrollment and events at the design or analysis stage using specified enrollment and time-to-event models through simulations.
- fix
unique()call inpredictEventto correctly include user-specifiedtarget_ttime points on the prediction grid by usingsort(unique(c(t, target_t + t0)))instead ofsort(unique(t, target_t + t0)) - fix simultaneous event/dropout tie-breaking in
predictEventso that when simulated event and dropout times are equal, dropout is not recorded, giving event priority - fix
rbindlistargument order inpredictEnrollmentfor the by-treatment observed-data branch so that the day-1 anchor row (df0) is listed beforedfa1, preventing it from overwriting valid enrollment counts at day 1 - fix ggplot2 ribbon
fillaesthetic inpredictEnrollmentat the design stage (by-treatment) to placefill = "prediction interval"insideaes(), consistent with other ribbons in the function - fix off-by-one denominator in Cox model extrapolation in
fitEventandfitDropoutso that the weighted-average hazard is computed assum(bh$haz[idx]) / (tcut[M+1] - tcut[M-m_use+1]), preventing an invalidbh$time[0]access whenm == M - fix
saveInputshandler inapp.Rto savetarget_n,target_d,pilevel,nyears, andtarget_tas rawinput$values, ensuring the save/load round-trip is consistent and does not fail whenpred_at_tis unchecked - remove bind_rows from app.R for shiny app as it is redundant and not needed
- change time0Ongoing in
predictEventfrom time to cutoffdt - randdt + 1 so that prediction starts at cutoffdt for ongoing subjects - remove the vertical reference line at the earliest totalTime for ongoing subjects in prediction plots
- add jsonlite and other shiny-app related packages to Suggests in DESCRIPTION with explicit minimum versions
- add .Rhistory to .Rbuildignore
- fix event_pred_at_t text rendering in shiny app at design stage by defining pred_at_t object in both design and analysis branches
Show all changes in 0.3.1Hide the rest of the changes in 0.3.1
- fix dropout fit plot rendering in shiny app when dropout_model is None by guarding against NULL dropout fit objects
- fix input restoration in shiny app by using the correct update functions for pilevel and fix_parameter
- preserve original covariate names in fitEvent and fitDropout to avoid case-mismatch failures in formula evaluation
- fix B-spline enrollment prediction rate averaging index in predictEnrollment when lags is larger than available history
- improve missing-value validation messages in app.R and getPrediction.R so reported columns are limited to required columns
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK14 OK2026-03-10
Documentation
- Help pages
- 17 (4 internal)includes a package overview page
- Examples that run
- 100%7 run in a plain check
- Exported functions with examples
- 54%
- Documented parameters
- 100%
- Return-value docs
- 92%
- Help pages citing references
- 35%
Downloads
Repository
Stars over time
Forks over time
Issues over time
Commits over time
6 development-tooling and community-health practices detected across 3 families in the upstream repository
Checks run against github.com/kaifenglu/eventpred on 2026-10-11.
GitHub Pages site last deployed 2026-08-01 · The repository has a site deploy workflow
pkgdown site last built 2026-08-01
Dependencies
Installing eventPred adds 89 packages (53 with compiled code, 93 MB of source tarballs). Heaviest: BH 14 MB, stringi 11 MB, ggplot2 6.0 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 0.3.1Latest
- 0.3.02026-06-05 · diff ↗
- RR 4.6.0 released · 2026-04-24
- 0.2.92025-06-10 · diff ↗
- RR 4.5.0 released · 2025-04-11
- 0.2.82025-03-20 · diff ↗
- 0.2.72025-03-13 · diff ↗ ·
removed 2 exports
llik_pwexp, runShinyAppadded 2 exports
pllik_pwexp, runShinyApp_eventPred - 0.2.62024-09-17 · diff ↗
- RR 4.4.0 released · 2024-04-24
- 0.2.52024-02-28 · diff ↗
- 0.2.4
- 0.2.32023-12-17 · diff ↗
- 0.2.2
- 0.2.12023-10-19 · diff ↗
- 0.2.02023-09-19 · diff ↗
- 0.1.52023-06-05 · diff ↗
Package metadata
- First published
- 2023-03-10
- Total releases
- 19 / 3 yrs
- License
- GPL (>= 2) OSI
- Minimum R
- ≥ 3.5.0
- Bundled data
- 5.9 KB / 3 files
- Download size
- 426 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("eventPred")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-19, which the citation names so these numbers can be found later. More on citing and the projects behind them.