Using jsurvival in jamovi: Complete Workflow
ClinicoPath Development Team
2025-06-30
Source:vignettes/general-26-jamovi-workflow-legacy.Rmd
general-26-jamovi-workflow-legacy.Rmd
Overview
This vignette demonstrates how to use the jsurvival module within jamovi for comprehensive survival analysis. The jsurvival module is part of the ClinicoPath suite and provides a user-friendly interface for conducting survival analyses without programming.
Installation in jamovi
Option 1: jamovi Library (Recommended)
- Open jamovi
- Click on the + button in the top-right corner
- Select jamovi library
- Search for “ClinicoPath” or “jsurvival”
- Click Install
Option 2: Manual Installation
- Download the latest
.jmo
file from releases - Open jamovi
- Click + → Sideload → Select the
.jmo
file
Data Preparation
Required Variables
For survival analysis, you need at minimum:
- Time variable: Time from start of study to event or censoring
- Event indicator: Binary variable indicating whether event occurred (1 = event, 0 = censored)
Analysis Workflows
1. Single Arm Survival Analysis
Use case: Overall survival characteristics of your entire study population
Steps: 1. Navigate to Survival → ClinicoPath Survival → Single Arm Survival 2. Assign variables: - Time Elapsed: Your time variable - Outcome: Your event indicator - Outcome Level: Select the level that indicates an event (usually “1”) 3. Configure options: - Cut Points: Time points for survival estimates (e.g., “12, 36, 60” for 1, 3, 5 years) - Time Type Output: Choose months or years - Confidence Intervals: Enable 95% CI - Risk Table: Show numbers at risk 4. Click Run
Output includes: - Overall survival curve - Median survival time with 95% CI - Survival rates at specified time points - Natural language summary
2. Survival Analysis (Group Comparisons)
Use case: Compare survival between different groups
Steps: 1. Navigate to Survival → ClinicoPath Survival → Survival Analysis 2. Assign variables: - Time Elapsed: Your time variable - Explanatory: Grouping variable (e.g., treatment, stage) - Outcome: Your event indicator - Outcome Level: Event level 3. Configure analysis: - Analysis Type: Choose overall, pairwise, or combination - P-value Adjustment: Method for multiple comparisons - Proportional Hazards: Enable Cox regression 4. Plotting options: - Risk Table: Show numbers at risk - Censored Points: Mark censored observations - Confidence Intervals: Display CI bands - End Plot: Set maximum time for plot
Output includes: - Kaplan-Meier curves by group - Log-rank test results - Cox regression hazard ratios - Pairwise comparisons (if selected) - Survival tables by group
3. Continuous Variable Survival Analysis
Use case: Find optimal cut-point for a continuous biomarker
Steps: 1. Navigate to Survival → ClinicoPath Survival → Survival Analysis for Continuous Variable 2. Assign variables: - Time Elapsed: Your time variable - Continuous Explanatory: Your continuous predictor - Outcome: Your event indicator 3. Cut-point options: - Find Cut-point: Let algorithm find optimal threshold - Manual Cut-point: Specify your own threshold 4. Configure analysis similar to group comparisons
Output includes: - Optimal cut-point determination - Survival curves for high/low groups - Hazard ratio for dichotomized variable - ROC analysis for cut-point validation
4. Multivariable Survival Analysis
Use case: Adjust for multiple risk factors simultaneously
Steps: 1. Navigate to Survival → ClinicoPath Survival → Multivariable Survival Analysis 2. Assign variables: - Time Elapsed: Your time variable - Explanatory: Multiple explanatory variables - Outcome: Your event indicator 3. Model options: - Model Type: Choose Cox proportional hazards - Variable Selection: Manual or automated selection - Interaction Terms: Include interactions if needed
Output includes: - Multivariable Cox regression table - Adjusted hazard ratios with 95% CI - Model fit statistics - Adjusted survival curves
5. Odds Ratio Analysis
Use case: Binary outcome analysis (case-control studies)
Steps: 1. Navigate to Survival → ClinicoPath Survival → Odds Ratio Table and Plot 2. Assign variables: - Outcome: Binary outcome variable - Explanatory: Risk factors 3. Configure: - Reference Level: Choose reference category - Confidence Level: Usually 95%
Output includes: - Odds ratio table - Forest plot - Chi-square test results
6. Time Interval Calculator
Use case: Calculate time differences from dates
Steps: 1. Navigate to Survival → Data Preparation → Time Interval Calculator 2. Assign variables: - Start Date: Beginning date - End Date: End date or follow-up date 3. Options: - Output Unit: Days, months, or years - Handle Missing: How to treat missing dates
Interpretation Guidelines
Kaplan-Meier Curves
- Steep drops: High event rate at specific times
- Flat portions: Low event rate (good prognosis periods)
- Wide confidence intervals: High uncertainty due to small sample size
- Crossing curves: Proportional hazards assumption may be violated
Best Practices
Data Quality
- Check for data completeness: Missing time or event data
- Validate event coding: Ensure consistent coding (0/1 or No/Yes)
- Review follow-up times: Check for unrealistic or negative times
- Assess censoring pattern: High censoring rates may bias results
Troubleshooting
Common Issues
- “No events observed”: Check event coding and follow-up time
- “Convergence failed”: May indicate separation or small sample size
- “Proportional hazards violated”: Consider stratified Cox model
- Missing survival curves: Check variable assignments and data types
Getting Help
- Documentation: Visit jsurvival website
- Issues: Report bugs at GitHub Issues
- Contact: serdarbalci@serdarbalci.com