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.5.2 (2025-10-31)
 os       macOS Tahoe 26.3
 system   aarch64, darwin20
 ui       X11
 language (EN)
 collate  en_US.UTF-8
 ctype    en_US.UTF-8
 tz       Europe/London
 date     2026-02-24
 pandoc   3.6.3 @ /Applications/Positron.app/Contents/Resources/app/quarto/bin/tools/aarch64/ (via rmarkdown)
 quarto   1.8.27 @ /Applications/Positron.app/Contents/Resources/app/quarto/bin/quarto

─ Packages ───────────────────────────────────────────────────────────────────
 package    * version date (UTC) lib source
 cmprsk       2.2-12  2024-05-19 [1] RSPM
 survival     3.8-3   2024-12-17 [2] CRAN (R 4.5.2)
 tidycmprsk   1.1.1   2025-11-14 [1] RSPM

 [1] /Users/christinafillmore/Documents/GitHub/CAMIS/renv/library/macos/R-4.5/aarch64-apple-darwin20
 [2] /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library

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

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

References

SAS PROC LIFETEST Documentation on CIF estimates

R package ‘tidycmprsk’ Documentation