I’ve recently had to calculate number-needed-to-treat for a survival model. I’ve found code by Austin [Absolute risk reductions and numbers needed to treat can be obtained from adjusted survival models for time-to-event outcomes Journal of Clinical Epidemiology 63 (2010) 46-55] and turned it into a SAS macro that can be found here: NNTsurv.sas .
Most of the work is turning it into a macro and taking advantage of some new SAS options that speeds up the calculation.

3 Comments
Milestone Mastercard posted on August 4, 2025 at 6:21 am
This is a great post! Its exactly the kind of thought content I love to see.
Milestone Mastercard posted on August 4, 2025 at 6:22 am
This post really hit home for me. I’m so glad you put this out there because it’s something that needed to be said. Thank you for your honesty.
Nelnet posted on September 16, 2025 at 1:32 am
Thank you for creating this! Its truly beautiful and I appreciate the efforts.