Most Frequent AE Sorted by Relative Risk

In addition to the Forest Plot with Subgroups, another popular graph in the clinical research space is the Most Frequent Adverse Events Sorted by Relative Risk graph.  Recently, I worked with folks from some pharmaceutical companies to contribute SAS code for this graph to the CTSPEDIA resource for statistical graphics.

The data for number of adverse events by preferred name and treatment is shown in the program attached.  The proportion for each drug is computed along with the relative risk difference using the following formula:

Risk difference: p1-p2; where p1 is the proportion for treatment B and p2 is the proportion for treatment A. n1 and n2 are the total number for treatment B and A respectively (95% CI).

The graph is created using a two cell Layout Lattice as shown here:

This construction of this graph is very simple using SAS 9.2 GTL:

  1. Use a two column Layout Lattice.
  2. Define a RowAxes block to set a single common external row axis.
  3. Populate two scatterplots in the first cell, one for each proportion by AE.
  4. Populate one scatter plot in second cell, showing LCL, UCL and Mean.
  5. Add a reference line at x=0.0 in second cell.
  6. Add title, legend and customize x axis label for second cell.

In the version shown below, I have used my standard technique to add alternate horizontal bands using wide faint reference lines to provide a graph with less clutter.

Full SAS 9.2 GTL program:  AEbyRelRisk

2 Comments

  1. Posted December 5, 2012 at 1:32 am | Permalink

    Log scale for RR would be preferable

    • Sanjay Matange Sanjay Matange
      Posted December 13, 2012 at 2:01 pm | Permalink

      That would work if the equation for the relative risk difference results in all positive values. In such cases, I have seen a log axis used, and it would be easy to set that option. In this case we have negative values, so it is not feasible to use log axis.

One Trackback

  1. By Two-in-one Graph - Graphically Speaking on January 18, 2014 at 6:15 pm

    [...] descending risk.  Such a graph can be created using a two cell graph using GTL as described in Most Frequent Adverse Events sorted by Relative Risk.  This graph uses the LAYOUT LATTICE to create a two cell graph, and then each cell is populated [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <p> <pre lang="" line="" escaped=""> <q cite=""> <strike> <strong>