─ Session info ───────────────────────────────────────────────────────────────
setting value
version R version 4.4.2 (2024-10-31)
os macOS Sequoia 15.6.1
system aarch64, darwin20
ui X11
language (EN)
collate en_US.UTF-8
ctype en_US.UTF-8
tz Europe/London
date 2025-08-29
pandoc 3.4 @ /Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/aarch64/ (via rmarkdown)
─ Packages ───────────────────────────────────────────────────────────────────
package * version date (UTC) lib source
cmprsk 2.2-12 2024-05-19 [1] CRAN (R 4.4.0)
survival 3.7-0 2024-06-05 [1] CRAN (R 4.4.0)
tidycmprsk 1.1.0 2024-08-17 [1] CRAN (R 4.4.0)
[1] /Users/christinafillmore/Documents/GitHub/CAMIS/renv/library/macos/R-4.4/aarch64-apple-darwin20
[2] /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/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