University of Rochester Medical Center
SearchDirectoryNewsEventsStrong HealthURMC Home
 

SAS Helpful Hints

Biostat Macro Library

Summary of Adverse Events

%AESummary resides in the departments SAS Macro Library and is enabled with the following SAS statements:

Libname biostat '\\BIO2\example\SASMacrosWindows';
Options Mstored SasMstore=biostat;

%AESummary calculates the number of subjects with any AEs, and the mean number of AEs per subject, for all AEs, excluding mild and excluding unrelated. %AESummary requires two input datasets. The first dataset must have one observation per subject to determine the size of each treatment group. The second dataset must have one observation for each AE reported. The Ns & Means are tabulated based on the number of unique AEs per subject. (If a subject reports “headache” four times, it is only counted once.) Chi-square tests are run for the Ns. Anovas are run for the Means. Boxplots of the means by treatment are also created. Available plot styles are BlackWhite, Color (white background) or PowerPoint (blue frame, gold trim, black background).

Syntax:
%AESummary
(subjects,aes,who,group,ae,severity,mild,relation,unrelated,style);
    subjects:    Dataset of enrolled with treatment group(one observation per subject).
    aes:           Dataset of AEs(one observation for each AE).
    who:         Subject ID.
    group:       Treatment Group(Numeric).
    ae:            AE term(Headache, Nausea...)
    severity:    AE Severity(Numeric).
    mild:         Value for Mild(Numeric Constant).
    relation:     Related to study meds(Numeric).
    unrelated:  Value for un-related(Numeric Constant).
    style:         BlackWhite, Color or PowerPoint.

Example:
%AESummary(work.enrolled,work.aes,id,treatment,ae,severity,1,relation,1,PowerPoint);

The default colors may be changed by defining a macro variable named “Colors”:

%Let Colors=Background_color Foreground_color Group1_color Group2_color Group3_color…;
%Let Colors=Blue Yellow Green Red Purple Black;

The default font of centx may be changed on all text by defining a macro variable named “Font”:

%Let Font=Simplex;

The position of the legend may be changed by defining a macro variable named "LegendOption":

%Let LegendOption=Position=(Inside Top Left) Across=2 Down=2;

Output:

Output:

 

 

Please send your comments and suggestions about this web page to A. Watts (watts@bst.rochester.edu)