R vs SAS - Estimating Cumulative Incidence Functions

Comparison of R and SAS

The following table shows the options available in R and SAS for estimating cumulative incidence functions (CIFs) in a competing risk analysis, especially the capabilities and whether the results match.

Analysis Supported in R package tidycmprsk Supported in SAS PROC LIFETEST Results Match
CIF estimates Yes: with function cuminc() Yes: with eventcode option in TIME statement Yes
Gray’s test for equality across groups Yes: default when the group variable (a factor) is on the right-hand side of the input formula Yes: default with strata statement Yes
Variance estimates for the CIF estimates using Aalen (1978) Yes: default Yes (default) Yes
Variance estimates for the CIF estimates using the delta method No Yes: with option error=delta in PROC TEST statement N/A
Confidence intervals for CIF estimates using log-log transformation Yes: default Yes: default Yes
Confidence intervals for CIF estimates using other transformations No Yes: with conftype option in LIFETEST statement N/A
CIF estimates for specified time points Yes: with times option when summarizing results, e.g., using tidy() Yes: with timelist option in LIFETEST statement Yes
CIF plot by groups Yes: with ggsurvfit::ggcumin() Yes: with plots=cif option in LIFETEST statement N/A

Additional details for using tidycmprsk are given here and for SAS PROC LIFETEST here .

─ Session info ───────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.4.2 (2024-10-31)
 os       Ubuntu 24.04.1 LTS
 system   x86_64, linux-gnu
 ui       X11
 language (EN)
 collate  C.UTF-8
 ctype    C.UTF-8
 tz       UTC
 date     2024-12-16
 pandoc   3.4 @ /opt/quarto/bin/tools/ (via rmarkdown)

─ Packages ───────────────────────────────────────────────────────────────────
 package    * version date (UTC) lib source
 cmprsk       2.2-12  2024-05-19 [1] RSPM (R 4.4.0)
 survival     3.7-0   2024-06-05 [2] CRAN (R 4.4.2)
 tidycmprsk   1.1.0   2024-08-17 [1] RSPM (R 4.4.0)

 [1] /home/runner/work/CAMIS/CAMIS/renv/library/linux-ubuntu-noble/R-4.4/x86_64-pc-linux-gnu
 [2] /opt/R/4.4.2/lib/R/library

─ External software ──────────────────────────────────────────────────────────
 setting value
 SAS     9.04.01M7P080520

──────────────────────────────────────────────────────────────────────────────

References

SAS PROC LIFETEST Documentation on CIF estimates

R package ‘tidycmprsk’ Documentation