May 10, 2021 at 1:16 pm
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.
By David Gagnon
|
Posted in Uncategorized
|
February 22, 2021 at 3:29 pm
Here is a set of SAS macros for producing publication-ready spline plots.

This work was inspired by the GLMCURV9 macro by Donna Spiegelman et al. which can be found at: Harvard SPH. This set of macros relies on SAS procedures and functions that were not available when GLMCURV9 was written, most notably in that they don't rely on PROC IML. These macros also do not rely on SASGRAPH procedures, instead using PROC SGPLOT and PROC SGPANEL for graphics displays.
Note also that these macros are not horribly complicated or long, so they should be readily modifiable by the user.
All of the macros are contained in a single SAS program which also includes graphics setup code as well as four macros that can produce spline plots for either PROC GLIMMIX [generalized linear models] or PROC PHREG [survival models] with either a single curve, or multiple curves with a stratifying/effect modifying variable.
There is a rather extensive README file, which describes the macros and shows sample output.
README Restricted Cubic Spline Plots
There is also the combined macro file, demo program and sample data set. The latest version can be found here along with other macros: https://people.bu.edu/gagnon/Macros.htm
These macros are released "as-is" and may be used freely. Please reference this web page for attribution.
By David Gagnon
|
Posted in SAS
|
April 6, 2014 at 3:29 pm
Here's an invited talk I gave recently at Osaka University. I was asked to speak about "journal impact factor", and turn it into a general intro into reading the literature. My thanks to the very gracious people at Osaka University for the opportunity to participate in the workshop on the "Risk Management Program for Thalidomide".
Finding your way in the literature
Also, a photo from Kumamoto -- cherry blossoms at night.

By David Gagnon
|
Posted in Uncategorized
|
September 12, 2013 at 5:00 pm
Recently presented at NESUG 2013 was a macro for making tables. Check it out at http://people.bu.edu/gagnon/Macros.htm
By David Gagnon
|
Posted in SAS
|