Type of Tool | SAS Macro |
Title | Boxplot |
Programmer/Email | ArthurWatts |
Contributing Site | Rochester |
Description | This set of Macros creates side-by-side boxplots by grouping variables with similar ranges onto the same graph. This is a quick way to check the distribution of several variables. This procedure can also be used after calling the Deltas macro, to check the distribution of changes from baseline. |
Example | Example graphic |
Classification Graph Type | Boxplot |
References | |
Datasets | |
Data | |
Software Program | SAS |
Software | SAS version |
Macro Parameters | Dataset: Dataset to use Group: Optional grouping variable Varlist: List of variables to Boxplot Maxperplot: Maximum number of variables on a graph Tolerance: Tolerance Pecentage(T)(0-100) (70 is a good start.) If the range of B is within T% of A, then put on the same graph Catalog: Graphics catalog to use |
R-Code - Attachment | |
R-Code | |
SAS-Code - Attachment | Rochester_BoxPlot_Main Macro |
SAS-Code | |
Stata-Code - Attachment | |
Stata-Code | |
Other Code - Attachment | |
Other Code | |
Called Data Manipulation | |
Called Tool/Utility | |
Called Checking Macro | |
Called Other | |
Creation-Date | |
Revision-Date | |
Example Code | |
Example Output | |
SAS Examples | |
SAS_Example_Code | |
SAS_Example_Output | |
R Examples | |
R_Example_Code | |
R_Example_Output | |
Stats Examples | |
Special Features | |
Special Features Attached | |
Special Features Text | There are several optional global macro variables that may be used: Parameters: Description Colors: Modifies the colors used to make the graph: %Let colors=background foreground group1color group2color group3color... Font: Font for all text. (i.e. %Let font=simplex;) Height: Height for all text. (i.e. %Let height=2;) Symbols: Symbols for points outside 1.5*IQR. %Let symbols=circle diamond triangle; Legendoptions: Options to modify the legend if a group is supplied. Ylabel: Label for the Y axis. |
Notes1-Legend | Section with calls to needed macros |
Notes1 | Filename incl URL "https://www.ctspedia.org/CTSpedia/Boxplots.attachments/BoxPlot.sas"; %Include incl; |
Notes2-Legend | Macro call with fully specified parameters |
Notes2 | %Boxplot(mydata,treatment,Cholesterol SystolicBP DiastolicBP,5,70,mplot); |
Notes3-Legend | Section with definitions of global macro parameters |
Notes3 | |
Notes4-Legend | Section with definitions of local macro variables |
Notes4 | |
See Also | |
Checklists | |
Stat Tools Disclaimer | This SAS macro is developed by Mr. Watts in the Department of Biostatistics and Computational Biology at the University of Rochester under the auspice of the CTSA BERD with the intent to facilitate data analyses and reporting in clinical and related research. It is copyrighted by Mr. Watts, August 2010 and distributed for free public access. |
Discliamer | The views expressed within CTSpedia are those of the author and must not be taken to represent policy or guidance on the behalf of any organization or institution with which the author is affiliated. |
Permission | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT OLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
Reference Image |