─ Session info ───────────────────────────────────────────────────────────────
setting value
version R version 4.5.3 (2026-03-11)
os Ubuntu 24.04.4 LTS
system x86_64, linux-gnu
ui X11
language (EN)
collate C.UTF-8
ctype C.UTF-8
tz UTC
date 2026-08-25
pandoc 3.10 @ /opt/quarto/bin/tools/ (via rmarkdown)
quarto 1.10.18 @ /usr/local/bin/quarto
─ Packages ───────────────────────────────────────────────────────────────────
package * version date (UTC) lib source
cmprsk 2.2-12 2024-05-19 [1] RSPM (R 4.5.0)
survival 3.8-6 2026-01-16 [2] CRAN (R 4.5.3)
tidycmprsk 1.1.2 2026-04-09 [1] RSPM (R 4.5.0)
[1] /home/runner/work/CAMIS/CAMIS/renv/library/linux-ubuntu-noble/R-4.5/x86_64-pc-linux-gnu
[2] /opt/R/4.5.3/lib/R/library
─ External software ──────────────────────────────────────────────────────────
setting value
SAS 9.04.01M7P080520
──────────────────────────────────────────────────────────────────────────────
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 .
NoteSession Info