Package: BJM 0.3.0

BJM: Backward Joint Model for the Dynamic Prediction of Both Time-to-Event and Longitudinal Outcomes

Provides tools to fit joint models of multivariate longitudinal data and time-to-event data for dynamic prediction. It allows the joint prediction of both future time-to-event outcomes and future longitudinal outcomes conditional on survival. The models accommodate irregularly measured longitudinal data and competing risks outcomes. The use of the backward joint model enables fast and efficient computation, especially for applications with large sample sizes and many longitudinal variables. Methods without competing risks are described in Shen and Li (2021) <doi:10.1002/sim.9037>, and their extension to competing risks is described in Li et al. (2026) <doi:10.1007/s10985-026-09725-x>.

Authors:Wenhao Li [aut, cre], Liang Li [aut]

BJM_0.3.0.tar.gz
BJM_0.3.0.zip(r-4.7-any)BJM_0.3.0.zip(r-4.6-any)BJM_0.3.0.zip(r-4.5-any)
BJM_0.3.0.tgz(r-4.6-any)BJM_0.3.0.tgz(r-4.5-any)
BJM_0.3.0.tar.gz(r-4.7-any)BJM_0.3.0.tar.gz(r-4.6-any)
BJM_0.3.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
BJM/json (API)

# Install 'BJM' in R:
install.packages('BJM', repos = c('https://wenhaoli18.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/wenhaoli18/bjm/issues

Pkgdown/docs site:https://wenhaoli18.github.io

Datasets:
  • pbc3 - Mayo Clinic primary biliary cirrhosis data used as example code

On CRAN:

Conda:

4.48 score 470 downloads 17 exports 22 dependencies

Last updated from:987db0ddb9. Checks:7 ERROR, 2 OK. Indexed: yes.
A new build is currently in progress.

TargetResultTimeFilesSyslog
linux-develERROR548
source / vignettesOK205
linux-releaseERROR496
macos-releaseERROR579
macos-oldrelERROR380
windows-develERROR542
windows-releaseERROR846
windows-oldrelERROR559
wasm-releaseOK110

Exports:calibrationPlotcheckBandcountConvergencecifPlotcmtPlotfitIntervalBJMimputeLongitudinallongitudinalSubperformancePlotpoolLongitudinalSubpredictLongitudinalpredictPlotpredictRiskriskPlotsimulateTrajectoryspaghettiPlotsurvivalSubsurvivalTrans

Dependencies:clicpp11farverggplot2gluegtableisobandlabelinglatticelifecycleMatrixmvtnormnlmeR6RColorBrewerrlangS7scalessurvivalvctrsviridisLitewithr

Getting Started with BJM
Overview | Step 1: Fit the survival sub-model with survivalSub() | Step 2: Fit the longitudinal sub-models with longitudinalSub() | Optional: imputing interrupted follow-up before fitting | A diffusion-based alternative | Propagating imputation uncertainty with poolLongitudinalSub() | Step 3: Predict event risk with predictRisk() | Step 4: Predict a future biomarker value with predictLongitudinal() | Choosing bandcount1, bandcount2, bandcount3 | Friendly error messages | Where to go next

Last update: 2026-10-02
Started: 2026-09-24

Nonlinear terms in longitudinal formulas
Overview | Terms that are always safe | Explicit polynomials and transforms | Interactions | Terms that are safe only in a continuous biomarker's long_sub_fixed | Orthogonal poly(), splines, and factor() | What goes wrong elsewhere | Precomputed time transforms with survivalTrans() | Putting it together: a spline term through to prediction

Last update: 2026-10-02
Started: 2026-10-02