Abstract
jsurvival provides time-to-event analyses and data preparation in jamovi and R, as part of the ClinicoPath suite. Its nine analyses cover Kaplan-Meier estimation, Cox and Fine-Gray regression, exploratory LASSO Cox modeling, odds ratios, dates and endpoint recoding. Results support research analysis; clinical interpretation depends on the endpoint definition, study design, data quality and model assumptions.
π― Key Features & Analysis Suite (9 Analyses)
jsurvival provides 9 dedicated analyses under the Survival menu in jamovi:
| Analysis | Function | Category | Key Clinical Features |
|---|---|---|---|
| Survival Analysis | survival |
Core Time-to-Event | Kaplan-Meier estimation, log-rank comparisons between groups, Cox proportional hazards regression, median survival with CIs, survival probabilities at selected times, person-time rates, and risk tables. |
| Single Arm Survival | singlearm |
Cohort Follow-up | Cohort-wide survival analysis for single-arm clinical trials or registry cohorts without an explanatory group; includes milestone survival probabilities and person-time rates. |
| Multivariable Survival | multisurvival |
Advanced Modeling | Multivariable Cox proportional hazards modeling with covariate adjustment, Fine-Gray regression for competing events, hazard ratio forest plots, model diagnostics, and adjusted survival curves. |
| Continuous Survival | survivalcont |
Biomarker Thresholds | Survival analysis for continuous variables and biomarkers; features a data-derived cut-off (maximally selected rank statistic, with a p-value adjusted for the search; it needs independent validation), multiple cut-offs by quantile, recursive, tree or minimum-p methods, and Kaplan-Meier plots by group. |
| Odds Ratio Analysis | oddsratio |
Association Studies | Logistic-regression odds ratios with profile-likelihood confidence intervals, optional Firth penalized estimation, forest plot, prediction nomogram and optional diagnostic metrics. Both outcome levels are named explicitly. |
| LASSO-Cox Regression | lassocox |
High-Dimensional Modeling | L1-penalized Cox regression via glmnet for high-dimensional feature selection (clinical, molecular, genomic), k-fold cross-validation, optimal lambda selection, and coefficient path plots. |
| Time Interval Calculator | timeinterval |
Clinical Data Prep | Robust calculation of follow-up durations from diagnosis and event/censoring dates, supporting days, weeks, months, and years with date sequence and consistency checks. |
| DateTime Converter | datetimeconverter |
Clinical Data Prep | Flexible date and timestamp parsing, standardization, and conversion into standardized temporal formats required for time-to-event analysis. |
| Outcome Organizer | outcomeorganizer |
Endpoint Derivation | Clinical endpoint mapping and standardization, recoding event statuses into analysis-ready indicators for OS, cause-specific, competing-risk, RFS, PFS, DFS, TTP and multistate analyses. |
π Installation
In jamovi
- Open jamovi (>= 2.7.27).
- Click the + button in the top-right corner β jamovi library.
- Search for jsurvival and install the available library version.
For a release candidate supplied by the maintainer, use Sideload in the module library and select its .jmo file. A local candidate may differ from the library version.
Start with a saved jamovi analysis
- In jamovi, open β° β Open β Data Library β jsurvival.
- Choose Survival Analysis: groups and age adjustment. Select its result in the results pane to see the assignments.
timeis in months,event = 1is an observed event, andgroupis the comparison variable. - Inspect the Risk table and the 24-month restricted mean survival time (RMST). Change the horizon on a copy and check how the estimate changes.
Downloads and a settings guide are available for all nine analyses. Saved jamovi examples
π‘ Quick Start (R Interface)
library(jsurvival)
data("melanoma", package = "jsurvival")
# status: 1 = died of melanoma, 2 = alive, 3 = died of other causes. time is in days.
# Treat other-cause deaths as censored for a cause-specific hazard analysis.
# 1. Kaplan-Meier, log-rank and Cox by group
fit <- jsurvival::survival(
data = melanoma, elapsedtime = "time",
outcome = "status", outcomeLevel = "1",
dod = NULL, dooc = NULL, awd = NULL, awod = NULL,
explanatory = "sex",
timetypeoutput = "days", cutp = "365, 1095, 1825"
)
# 2. Continuous variable, with a data-derived cut-off
cut_fit <- jsurvival::survivalcont(
data = melanoma, elapsedtime = "time",
outcome = "status", outcomeLevel = "1",
dod = NULL, dooc = NULL, awd = NULL, awod = NULL,
contexpl = "age", findcut = TRUE,
timetypeoutput = "days", cutp = "365, 1095, 1825"
)
# 3. LASSO Cox
data("lassocox_breast_cancer", package = "jsurvival")
lasso_fit <- jsurvival::lassocox(
data = lassocox_breast_cancer, elapsedtime = "survival_months",
outcome = "death", outcomeLevel = "Dead", censorLevel = "Alive",
explanatory = c("age", "tumor_size_cm", "grade", "stage", "lymph_nodes_positive",
"er_status", "pr_status", "her2_status", "ki67_percent", "lvi"),
lambda = "lambda.min"
)Before reporting results
- Use one row per independent patient. Recurrent events, repeated visits, delayed entry and time-dependent covariates require analyses designed for those data.
- DateTime Converter parsing-count percentages use all observations; its separate parse rate excludes originally missing values. Successful parsing does not establish that the chosen date order is correct.
- Confirm the event value and censoring rule. Missing status or a missing death date does not establish that a patient is alive. Composite endpoints need time to the first qualifying event; Outcome Organizer produces the status, not that time.
- Precalculated follow-up is used in its supplied unit. Changing Time Type in Output does not convert it, and typed time points are read in the selected unit (the default
12, 36, 60is in months; use365, 1095, 1825for 1, 3 and 5 years in days). Landmark analyses retain only times strictly greater than the landmark. - A group with no events has no estimable Cox hazard ratio. Survival Analysis leaves it blank with a note; compare that group with the log-rank or pairwise tests.
- Use cumulative incidence for absolute event risk with competing events. Report a Cox hazard ratio for a cause-specific hazard, a Fine-Gray subdistribution hazard ratio for its regression estimand, or a logistic odds ratio for a defined binary endpoint. For diagnostic performance, specify the reference outcome and both levels of the binary test. The ordinary logistic nomogram maps model points to fitted probabilities.
- Treat data-derived cutoffs and LASSO selection as exploratory. Preserve the exact cutoff (Low β€ cutoff; High > cutoff). Lambda cross-validation tunes the penalty; displayed C-indices and same-data risk groups do not establish validated predictive performance.
The methods and reporting guide includes executable arithmetic checks and a reporting checklist. Review the release notes and recalculate analyses saved with earlier versions. Methods and reporting Release notes
For interaction models, both forest styles in Multivariable Survival display each fitted coefficient, conditioning values and a caption. Read interaction rows as ratios of hazard ratios. When stratification is enabled in Multivariable Survival, pooled cross-stratum risk scores are withheld because baseline hazards differ across strata. Survival Analysis adjusted curves use the age-adjusted tableβs fitted model, retaining requested baseline and age-group strata. Stratified standardized curves end at the shortest observed stratum follow-up; confidence bands for these averages are not provided.
Example data
The histopathology example illustrates overall survival by lymphovascular invasion (LVI) in a synthetic cohort. The analysis uses OverallTime in months, Outcome with event level 1, and LVI as the grouping variable. From R, nine datasets are bundled: histopathology, melanoma, data_longitudinal, and six lassocox_* cohorts (lassocox_breast_cancer, lassocox_cardiovascular, lassocox_genomic, lassocox_lung_cancer, lassocox_multicollinear, and lassocox_small_cohort).
The teaching workbooks in data/ cover every function. Their notes explain the synthetic study, variable coding, selected settings and how to interpret the results. Compare LASSO penalty rules, overall-survival and competing-risk coding, standardized and calendar-aware months, or ISO text and Excel serial dates. A binary pathology workbook shows ordinary logistic regression with a prediction nomogram and an explicitly coded diagnostic test. A separate example shows the safeguard that applies when Firth estimation is selected. Save any changes to the teaching files under a new name. Workbooks and settings
π Documentation & Resources
- Module Website & Vignettes: https://www.serdarbalci.com/jsurvival/
- ClinicoPath Umbrella Ecosystem: https://www.serdarbalci.com/ClinicoPathJamoviModule/
- GitHub Repository: https://github.com/sbalci/jsurvival/
- Issue Tracker: GitHub Issues
π License
This project is licensed under the GPL (>= 2) License β see the LICENSE.md file for details.