Presentation is loading. Please wait.

Presentation is loading. Please wait.

Forest Plotting Analysis Macro %FORESTPLOT (Paper 3419)

Similar presentations


Presentation on theme: "Forest Plotting Analysis Macro %FORESTPLOT (Paper 3419)"— Presentation transcript:

1 Forest Plotting Analysis Macro %FORESTPLOT (Paper 3419)
Jeffrey Meyers Qian Shi, PhD. Mayo Clinic, Rochester MN The forest plot is a graph commonly associated with meta analysis. It allows for a quick visual comparison of estimates across subgroups or variable levels. They are not as commonly used as other graphics because of the amount of work to produce one. The estimate and any other statistics to be displayed must be calculated, added to a final plot dataset, and then plotted. If a forest plot is comparing multiple model outputs, then the code to produce the statistics becomes replicated and prone to errors. The forest plot macro fully automates multiple types of analyses including Cox proportional hazards regression, logistic regression, Kaplan-Meier event-free rates, and binomial success rates, and gives a vast amount of customization options. The macro also includes the flexibility of being able to input a pre-generated dataset to transform into a high quality forest plot. Copyright © 2010, SAS Institute Inc. All rights reserved.

2 Forest Plot Example (Graphically Speaking)
The forest plot is a graph commonly associated with meta analysis. It allows for a quick visual comparison of estimates across subgroups or variable levels. They are not as commonly used as other graphics because of the amount of work to produce one. The estimate and any other statistics to be displayed must be calculated, added to a final plot dataset, and then plotted. If a forest plot is comparing multiple model outputs, then the code to produce the statistics becomes replicated and prone to errors. Lets look at this graph from Sanjay’s Graphically Speaking blog and assume that each of these models is a single comparison. This would mean up to 9 models would have to be run, combined, and output to make this one graph. I believe this is one of the main contributors to why forest plots are not used as often as other graphics. #SASGF13 Copyright © 2013, SAS Institute Inc. All rights reserved.

3 Forest Plot Example (%FORESTPLOT)
The code to actually produce a forest plot from a dataset is not complicated, especially in SAS This is an example of my macro using nearly the same dataset as the previous slide to generate a custom forest plot. The macro has some differences, namely some of the formatting. The FORESTPLOT macro can use pre-generated data to output a forest plot, but that is not its main purpose. #SASGF13 Copyright © 2013, SAS Institute Inc. All rights reserved.

4 Purpose Creation of high quality forest plots with high level of customizations Automate the calculations of ratios and estimates involved with forest plot Logistic and Cox proportional hazards regression, Kaplan-Meier time-point estimates, binomial success rate, user provided data Analysis across factors of a variable, subgroups, or in Univariate and multivariate models Automate the creation of a dataset most conducive to producing a forest plot #SASGF13 Copyright © 2013, SAS Institute Inc. All rights reserved.

5 Plot Setup Graph is designed with Graph Template Language (GTL)
Two separate versions for SAS 9.2 and 9.3+ Due to limitations within 9.2 alleviated in 9.3+ Nearly every piece of graph is customizable Can be output in many formats (PNG, JPEG, TIFF, EMF, PDF, PS, etc.) Size, location, and name of file customizable Can be included within ODS tags in larger report

6 Macro Process METHOD Determines Analysis Method Cox Regression Method
Kaplan-Meier Estimate Method Transform Dataset into Final Plot Dataset Create Template And Generate Plot Error Checking Logistic Regression Method Analysis + Output Dataset Inputs Binomial Success Rate Method Inputted Data Method This slide will have the “consort diagram” of the macro process flow #SASGF13 Copyright © 2013, SAS Institute Inc. All rights reserved.

7 Sample Datasets (Logistic/Binomial)
Neuralgia dataset provided by SAS Link to dataset creation Treatment: A and B are active arms P stands for Placebo arm Insert table of first several rows of dataset #SASGF13 Copyright © 2013, SAS Institute Inc. All rights reserved.

8 Sample Datasets (Kaplan-Meier)
BMT dataset provided by SAS Located in SASHELP library (version 9.3 or later) Version 9.2 creation T: time from transplant to death Status: 0=Alive, 1=Dead Group=Disease Category ALL=Acute Lymphoblastic Leukemia AML=Acute Myeloid Leukemia Insert first few rows of dataset #SASGF13 Copyright © 2013, SAS Institute Inc. All rights reserved.

9 Estimates Across Levels of a Factor
Statistics In order requested X-axis options Labels, range, type Automatic label Automatic levels Reference line

10 Customized Title Automatic footnotes Categorical factors
Level vs reference Multiple formats Continuous factors Adjustable step size Markers Symbols, colors, size Line thickness Changeable by model Plot walls

11 Disabled automatic footnotes Spaces between models
Headers Super or Subscripts Line breaks Manual footnotes Categorical format 2 levels condensed Continuous format Condensed to one row Disabled automatic footnotes Spaces between models

12 Column header for model titles Specific factors listed from each model
2 level factors can be combined into one row Model level statistics Concordance N Events/Total P-values Factor level statistics Ratios/Rates

13 Example of Subgroup Analysis
Model Titles Where clauses Separate by model Line-caps disabled Separate p-values by model Multiple time-points Text overflows into plot Add examples of different kinds of forest plots with different formatting #SASGF13 Copyright © 2013, SAS Institute Inc. All rights reserved.

14 Example of Subgroup Analysis
Use of multiple BY variables Pooled value for comparison Multiple formats available Default label Manual label Add examples of different kinds of forest plots with different formatting #SASGF13 Copyright © 2013, SAS Institute Inc. All rights reserved.

15 Plot Example (SAS 9.2) Scalable vector graphics unavailable
Pooled value for comparison More tabular display Reference on own row

16 Closing Forest plots are a versatile method for displaying data
%FORESTPLOT greatly reduces effort required to build a forest plot Goals for the future: More types of analyses such as linear regression Allow more panels of plots and statistics

17 References First Example Concordance Methods:
“Graphically Speaking: Forest Plot with SAS 9.3.” Sanjay Matange, January 6, 2013 Concordance Methods: Cox Regression: Therneau T (2014). _A Package for Survival Analysis in S_. R package version , <URL: Logistic Regression: cNeil BJ: The meaning and use of the area under a receiver operating characteristic (ROC) curve. Radiology 143:29-36, 1982.

18 Contact Information Name: Jeffrey Meyers Enterprise: Mayo Clinic Address: 200 1st St SW City, State ZIP: Rochester, MN 55905 Work Phone: Twitter: jmeyers_spa SAS Community Wiki Page: Link The forest plot macro greatly alleviates the amount of effort required to produce a high quality forest plot, and gives a vast amount of customizability to meet the users needs. Forest plots are very useful beyond meta-analysis and are more informative than a basic table.


Download ppt "Forest Plotting Analysis Macro %FORESTPLOT (Paper 3419)"

Similar presentations


Ads by Google