Format
groomecompare_test: Standard dataset with 150 observations and 7 variables:
- patient_id
Character. Patient identifier (PT001-PT150)
- time
Numeric. Survival time in months (exponential distribution, mean ~20)
- event
Factor. Event indicator (0 = censored, 1 = death/event). Event rate ~60\ ageNumeric. Patient age in years (40-80) sexFactor. Patient sex (Male, Female) ypTNMOrdered factor. Post-neoadjuvant pathological staging (I, II, III, IV) RPAOrdered factor. Recursive partitioning risk groups (Low, Intermediate, High Risk)
groomecompare_small: Small sample dataset with 60 observations and 7 variables:
groomecompare_large: Large dataset with 300 observations and 8 variables:
Special test datasets:
- groomecompare_unbalanced
120 observations with unbalanced staging systems (5 vs 2 groups)
- groomecompare_tied
80 observations with many tied survival times
- groomecompare_identical
100 observations with identical staging systems (negative control)
- groomecompare_clear_winner
150 observations where one system is clearly superior
- groomecompare_edge_truefalse
40 observations with event coded as TRUE/FALSE
- groomecompare_edge_12
40 observations with event coded as 1/2
Survival times follow exponential distribution
Event rates are clinically realistic (55-65\
Prognostic correlations built in (advanced stage → shorter survival)
Both systems have predictive value but differ in discrimination
Sufficient events per variable (EPV > 10) for Cox models
Hazard Consistency: Monotonicity of hazard ratios across stages
Hazard Discrimination: Range/spread of hazard ratios between stages
Sample Balance: Distribution of patients across staging groups
Outcome Prediction: C-index/concordance for outcome prediction
Non-negative survival times
Proper factor level ordering (ordinal staging variables)
Realistic clinical distributions
Differential performance between staging systems
Sufficient sample sizes for comparison
RDA: Native R format (use
data())CSV: Comma-separated values (data/nonrda/)
XLSX: Excel format (data/nonrda/)
OMV: jamovi native format (data/nonrda/)
Standard comparison: Use
groomecompare_testwith two staging systemsSmall samples: Use
groomecompare_small, test sample size warningsComplex systems: Use
groomecompare_largewith detailed AJCC8 vs RPA5Unbalanced groups: Use
groomecompare_unbalanced(5 groups vs 2 groups)Tied times: Use
groomecompare_tiedto test tie handlingIdentical systems: Use
groomecompare_identical(negative control, all metrics ~0.5)Clear winner: Use
groomecompare_clear_winnerwhere one system dominatesEvent coding: Test TRUE/FALSE and 1/2 coding schemes
All visualizations: Test radar plots, bar plots, Kaplan-Meier curves
Bootstrap validation: Test with bootstrap=TRUE, nboot=100-500
Non-negative survival times
Appropriate event rates (55-65\
Stage-survival correlation (advanced stage → worse prognosis)
Sufficient EPV (events per variable > 10) for Cox models
Realistic clinical distributions
Proper factor level ordering for ordinal staging
Differential performance between systems (for comparison testing)
Hazard Consistency (Rank 1-2): Monotonicity of hazard ratios
Hazard Discrimination (Rank 1-2): Spread of hazard ratios
Sample Balance (Rank 1-2): Distribution across stages
Outcome Prediction (Rank 1-2): C-index comparison
Overall Rank: Sum of individual ranks (lower is better)
data-raw/groomecompare_test_data.R.
Seed: 12345. Generation date: 2026-01-31.
Synthetic datasets for testing and demonstrating the groomecompare function
(Groome Staging System Comparison for Survival Data).
These datasets were generated using a seeded random number generator to produce
realistic survival data for testing Groome staging system comparison with the
following characteristics:
groomecompare_all_scenarios.xlsx contains all test scenarios.
Usage Examples
See vignette("groomecompare-examples") for comprehensive examples.
Basic usage:
data(groomecompare_test)
library(ClinicoPath)
# Standard Groome comparison
groomecompare(
data = groomecompare_test,
time = "time",
event = "event",
stage1 = "ypTNM",
stage2 = "RPA",
stage1name = "ypTNM Staging",
stage2name = "RPA Classification"
)
# With bootstrap validation
groomecompare(
data = groomecompare_test,
time = "time",
event = "event",
stage1 = "ypTNM",
stage2 = "RPA",
bootstrap = TRUE,
nboot = 100,
seed = 12345
)
# Test different event coding
data(groomecompare_edge_truefalse)
groomecompare(
data = groomecompare_edge_truefalse,
time = "time",
event = "event_tf",
stage1 = "ypTNM",
stage2 = "RPA",
eventValue = "TRUE"
)groomecompare for the main analysis function
vignette("groomecompare-examples") for comprehensive usage examples
rpasurvival_test_data for RPA survival analysis test data
datasets