Skip to content

eventPred

0.3.1Package record

Event Prediction

1packages depend
5.7Kdownloads / year
56.5%test coverage
13/13flavors OK

Overview

About

Predicts enrollment and events at the design or analysis stage using specified enrollment and time-to-event models through simulations.

Changes in 0.3.1
  • fix unique() call in predictEvent to correctly include user-specified target_t time points on the prediction grid by using sort(unique(c(t, target_t + t0))) instead of sort(unique(t, target_t + t0))
  • fix simultaneous event/dropout tie-breaking in predictEvent so that when simulated event and dropout times are equal, dropout is not recorded, giving event priority
  • fix rbindlist argument order in predictEnrollment for the by-treatment observed-data branch so that the day-1 anchor row (df0) is listed before dfa1, preventing it from overwriting valid enrollment counts at day 1
  • fix ggplot2 ribbon fill aesthetic in predictEnrollment at the design stage (by-treatment) to place fill = "prediction interval" inside aes(), consistent with other ribbons in the function
  • fix off-by-one denominator in Cox model extrapolation in fitEvent and fitDropout so that the weighted-average hazard is computed as sum(bh$haz[idx]) / (tcut[M+1] - tcut[M-m_use+1]), preventing an invalid bh$time[0] access when m == M
  • fix saveInputs handler in app.R to save target_n, target_d, pilevel, nyears, and target_t as raw input$ values, ensuring the save/load round-trip is consistent and does not fail when pred_at_t is unchecked
  • remove bind_rows from app.R for shiny app as it is redundant and not needed
  • change time0Ongoing in predictEvent from 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

CRAN checks
13OK
Slowest check: 9.0 min · r-oldrel-macos-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-09
  • ERROR12 OK, 1 ERROR2026-06-08
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 0.3.1
READMEYes · 231 wordsVignettesYes · 5 · dynamicNEWSYes · 100% structured · mentions 0.3.1Citation fileNoWebsiteYes · pkgdown
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

5.7K
CRAN downloads in the past year
Rank #5,831 · ~16/day · ~474/mo
Daily download trend is not available in this view yet.
70730 days
1.4K90 days
5.7K1 year
Compare downloads with other packages →
Also on85 r2u8 autocran

Repository

5Stars
2Forks
1Open issues
0Open PRs
0Releases
395Commits
1Commit identities
395 commits · Last activity 2026-08-01 · 0% stars, 30d
Responsiveness
not measured

Stars over time

2025-09-16 · 22026-07-07 · 5
PracticesBeta

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.

Continuous integration (1)
GitHub Actions
Docs source (3)
pkgdown

GitHub Pages site last deployed 2026-08-01 · The repository has a site deploy workflow

pkgdown site last built 2026-08-01

Reproducibility and dev environment (2)
renvdata-raw/
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
28 external dependencies (excludes base and recommended)

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.

Depends (1)
R >= 3.5.0
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
1direct
0indirect
Imports 1
Depends, Imports or LinkingTo, most downloaded first

Datasets

People & History

People (1)
Author, Maintainer since 0.0.1 (2023)
Releases (19)

Pick two releases to compare their code metrics.

Show 8 earlier eventsHide 8 earlier events

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")
Lu, K. (2026). eventPred: Event Prediction (Version 0.3.1) [Computer software]. https://doi.org/10.32614/CRAN.package.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.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for eventPred version 0.3.1 [Data set]. HJJB, LLC. Data release v2026-10-19. https://doi.org/10.5281/zenodo.21843040

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.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy