%MAKE_IT_COUNT: An Example Macro for Dynamic Table Programming Britney Gilbert, Juniper Tree Consulting, Porter, Oklahoma
|
|
- Amberlynn Ramsey
- 5 years ago
- Views:
Transcription
1 Britney Gilbert, Juniper Tree Consulting, Porter, Oklahoma ABSTRACT Today there is more pressure on programmers to deliver summary outputs faster without sacrificing quality. By using just a few programming strategies, the %MAKE_IT_COUNT macro is simple, straightforward to understand and easily adapted for changing reporting needs. This paper shares an example macro and explores the use of MULTILABEL and PRELOADED formats, PROC SUMMARY options, and dynamic ARRAYs. INTRODUCTION Having adaptable programs are a must-have in every programmer s tool box to accomplish tight timelines. To start, a programmer needs to think beyond a summary table mock-up by adding dynamic data steps and procedure features. The challenge is writing a macro that is adaptable without being cryptic, so the program maintains efficiency as it s passed to a fellow programmer. The %MAKE_IT_COUNT macro accomplishes this goal by making use of MULTILABEL and PRELOADED formats, PROC SUMMARY options, and dynamic arrays while preserving readability. Figure 1 Sample Dataset To demonstrate the use of the %MAKE_IT_COUNT macro (see Appendix for complete program), a sample dataset, a sample Table Mock-up, and SAS 9.3 were used. In this sample subject level dataset (ADSL), there are 100 subjects from three sites (SITEN = 001,002,003) in three regions (SITE = US, Europe, Other) receiving one of three treatments (TRT01A). Sex and age variables are also included and an age grouping (AGEGR1) variable has been derived. Figure 2 Sample Table Mock-up 1
2 MACRO PREREQUISITES There are a few prerequisites for using the %MAKE_IT_COUNT macro. A sorting order will need to be added to the demographic formats. Also, to maintain easy modification, the table mock-up columns should use a MULTILABEL format. Lastly, create macro variables for each column s denominator. DEMOGRAPHIC FORMATS WITH SORTING ORDER First, the macro assumes that the demographic variables are formatted and the sorting order is part of the format. For example, in the region format ($region), the values US, Europe, and Other are mapped to 01 US, 02 Europe, and 03 Other so that the regions will be displayed in the correct order. With this approach, two birds are killed with one stone: one, the display format can be adjusted i.e. changing case, abbreviations, etc. and two, the need for extra sorting variables are eliminated. Next, each section or report block of the table mock-up is also formatted (see Figure 2). In Figure 3, the format $blk is defined for the report blocks Region, Gender, and Age Grouping. This format is used for creating the row text for the final output. MULTILABEL FORMATS The Total column is defined using a MULTILABEL format. In a MULTILABEL format, more than one data point can be mapped to a single format value. In this case, the three treatment groups (TRT01AN = 1,2,3) are mapped to a fourth value 04. With this approach, the need to derive a new treatment group Total prior to running PROC SUMMARY is eliminated. Using a MULTILABEL format is a pivotal piece in updating for future versions of the table mock-up. This will be discussed in greater detail later in the paper. DENOMINATORS AS MACRO VARIABLES Figure 3 Formats The macro assumes that the denominators for each column are stored in a macro variable. This program uses a simple PROC SQL creating four macro variables (BIGN01-BIGN04) for the four columns in the table mock-up (Treatment A, Treatment B, Placebo, and Total). Figure 4 Denominators THE MACRO %MAKE_IT_COUNT The macro consists of a PROC SUMMARY, a PROC TRANSPOSE, and a DATA step to produce a report-ready output. Each report block is run through the macro separately to maintain flexibility as the future versions of the table mock-up can add or delete sections. There are three macro variables in the definition: &DS, &BLK, &VAR. The macro variable &DS defines the dataset where &VAR is stored, &BLK refers to the report block as defined in the PROC FORMAT, and &VAR is the variable used in the counts and percentages in the report block. 2
3 Below is a step by step demonstration using the macro call %MAKE_IT_COUNT(BLK = BLK01, VAR = SITE). For this example, all three report blocks are pulled from a single dataset, ADSL. Therefore, DS is defined in the MACRO statement (see Appendix). PROC SUMMARY OPTIONS In this macro, PROC SUMMARY is used to get the frequencies or counts for each category. The macro makes use of the CLASS Options PRELOADFMT and MLF. The CLASS Option PRELOADFMT loads all the values of the formatted variable. These formatted values are now the actual values in the output dataset. The CLASS Option MLF signals PROC SUMMARY to load the many to one mapping defined in the format. Figure 5 PROC SUMMARY Although this example has counts in each level, in cases where not all levels of a categorical variable are present in the data, using a preloaded format will present zero counts. This eliminates the need to create any report shell to ensure proper display. Figure 5 shows the syntax and resulting dataset when the macro is called for the first block of the table, Region. The variable SITE now holds both the sort order and Region names. TRT01AN now has four levels the three treatments and the total (TRT01AN = 04 ). PROC TRANSPOSE Because of the strategic ordering of the CLASS variables, no PROC SORT is needed before the PROC TRANSPOSE. The TRANSPOSE syntax is straightforward: The BY variable is &VAR, the ID variable is the treatment variable TRT01AN, and the VAR variable is the SUMMARY default variable _FREQ_. Now, the TRT01AN values are the column names with the prefix CNT and their values are the counts in _FREQ_. Figure 6 PROC TRANSPOSE THE DATA STEP First in the DATA step, the variable BLK is created using the &BLK macro variable defined in the macro call. This variable can be used in a PROC REPORT as a GROUP variable to keep the report blocks in order and for additional formatting like skipped lines or pagination. PROC REPORT syntax is not included in the %MAKE_IT_COUNT macro and is beyond the scope of this paper. Figure 7 The DATA Step Next, a blank row is created to hold the report block row text. This was defined in the $blk format at the beginning of the program. In this example &BLK resolves to BLK01 and is formatted to Region. Then, the ARRAYS are defined for the counts (CNT01-CNT04) and for the derived variables PCNT01-PCNT04 that will hold the counts and percentages. In the ARRAY statement, a previously defined macro variable &MAXNO is used so that the total number of variables remains 3
4 dynamic. This coupled with the use of common variable prefixes (CNT and PCNT) allows the number of columns to be flexible for future changes. Figure 8 Adding a New Column Finally, the percentages are calculated and concatenated with the counts. The denominators are stored in the macro variables BIGN01- BIGN04 as defined prior to the macro call. In the ARRAY p, the macrotized denominators are called using SYMGET. To create a nice uniform formatting of the counts and percentages, picture formats (count and perc) are used. UPDATING THE MACRO This macro was designed to add columns or change denominators with minimum turnaround time. Below is a step by step guide for making these types of updates. First, a subtotal for Treatment A and Treatment B will be added. Then, for the report block Age Grouping, the denominator will be updated to use US patients only. ADDING A NEW COLUMN The new Table mock-up requests an addition subtotal column for Treatment A and Treatment B. To make this update, first add the definition of the subtotal column (TRT01AN = 1 and TRT01AN = 2) to the format grp and map it to column 03. Remember to reorder the subsequent columns. Second, modify the PROC SQL to define the denominator for the new subtotal column and adjust the subsequent columns denominators to the new order. That s all! Two quick updates and the resulting datasets from the macro are updated with a new subtotal column. Figure 9 Changing a Denominator CHANGING A DENOMINATOR Here, another new Table mock-up is requested and the denominator for the Age Grouping report block is changed to US patients only. To change a denominator for a particular report block, first the new denominator needs to be defined. Additional SQL Statements are added for these new denominators. Next, the percentage derivation is updated. Triggering on the &BLK variable, a series of IF-ELSE statements are added. Again, in two quick modifications, the new output is ready for reporting! 4
5 GOING BEYOND THE MACRO This macro is designed for counts and percentages, but these same strategies can be used to create another version for other uses. DESCRIPTIVE STATISTICS PROC SUMMARY is more powerful than just producing frequencies. PROC SUMMARY produces the same statistics as PROC MEANS. A few modifications can create a macro that produces descriptive statistics and beyond. LIMITATIONS It is important to note that this macro is limited to nine columns because of the ARRAY definitions. If more than nine columns are needed for reporting, the ARRAY statement could be adjusted for when &MAXNO is greater than nine. CONCLUSION In this paper, the %MAKE_IT_COUNT macro has been dissected and demonstrated with demographic data. With each step, the use of procedural options, MULTILABEL and PRELOADED formats, along with the use of dynamic ARRAYs eliminated the need for data duplication, additional procedures and DATA steps. Further, two modification scenarios, additional columns and changing denominators, have been explored showing this macro s flexibility with changes to table mock-ups. 5
6 APPENDIX **********************************************************************; * %MAKE_IT_COUNT EXAMPLE *; **********************************************************************; LIBNAME MY_LIB "D:\USERS\BGILBERT\DESKTOP"; PROC FORMAT; PICTURE COUNT LOW-HIGH =" 009"; PICTURE PCNT LOW-HIGH =" 009.9%)" (PREFIX = "("); VALUE $BLK "BLK01"= "REGION" "BLK02"= "GENDER" "BLK03"= "AGE GROUPING"; VALUE GRP (MULTILABEL) 1 = "01" 2 = "02" 1,2,3 = "04"; 3 = "03" VALUE $REGION (MULTILABEL) "US" = "01 US" "EUROPE" = "02 EUROPE" "OTHER" = "03 OTHER"; VALUE GENDER (MULTILABEL) 1= "01 MALE" 2= "02 FEMALE"; VALUE AGEGRP (MULTILABEL) 1= "01 <= 65 YEARS" 2= "02 > 65 YEARS"; DATA ADSL; SET MY_LIB.ADSL; FORMAT TRT01AN GRP. SITE $REGION. SEXN GENDER. AGEGR1N AGEGRP.; PROC SQL NOPRINT; SELECT COUNT (DISTINCT USUBJID) INTO: BIGN01 FROM ADSL WHERE TRT01AN = 1; SELECT COUNT (DISTINCT USUBJID) INTO: BIGN02 FROM ADSL WHERE TRT01AN = 2; SELECT COUNT (DISTINCT USUBJID) INTO: BIGN03 FROM ADSL WHERE TRT01AN = 3; SELECT COUNT (DISTINCT USUBJID) INTO: BIGN04 FROM ADSL; QUIT; %MACRO MAKE_IT_COUNT(DS=ADSL, BLK=, VAR=); PROC SUMMARY DATA = &DS. NWAY COMPLETETYPES; CLASS &VAR. TRT01AN/ PRELOADFMT MLF; OUTPUT OUT = FREQS; PROC TRANSPOSE DATA = FREQS OUT = R&BLK. PREFIX = CNT; BY &VAR.; ID TRT01AN; VAR _FREQ_; %GLOBAL MAXNO; DATA _NULL_; SET FREQS END = LR; NO = INPUT(SUBSTR(REVERSE(TRT01AN),1,1),8.); MAXNO = MAX(MAXNO,NO); IF LR THEN CALL SYMPUT("MAXNO",COMPRESS(PUT(MAXNO,8.))); %PUT &MAXNO; DATA &BLK. (KEEP = BLK ROW PCNT:); LENGTH BLK $6 ROW $200; SET R&BLK; BLK = "&BLK."; IF _N_ = 1 THEN DO; ROW = PUT("&BLK.",$BLK.); OUTPUT; END; ROW = " " SUBSTR(&VAR.,4); ARRAY C{*} CNT01-CNT0&MAXNO.; ARRAY P{*} $ 50 PCNT01-PCNT0&MAXNO.; DO I = 1 TO HBOUND(C); IF C{I} > 0 THEN P{I} = PUT(C{I}, COUNT.) " (" PUT(ROUND((C{I}/INPUT(SYMGET(COMPRESS("BIGN" PUT(I,Z2.))),8.)*100),.1), 5.1) "%)"; ELSE IF C{I} = 0 THEN P{I} = PUT(C{I}, COUNT.); END; OUTPUT; %MEND; %MAKE_IT_COUNT(BLK=BLK01, VAR=SITE); %MAKE_IT_COUNT(BLK=BLK02, VAR=SEXN); %MAKE_IT_COUNT(BLK=BLK03, VAR=AGEGR1N); DATA FINAL; SET BLK01 BLK02 BLK03; 6
7 ACKNOWLEDGMENTS First, I would like to thank my Lord, Jesus Christ. It is through Him that I find my strength, patience, and resolve. Next, I would like to thank my family: my encouraging husband, Justin, and my kids (Hope, Faith, Justin, Danny, Charity, and Paul) who are my never-ending source of happiness. RECOMMENDED READING Base SAS Language Reference Base SAS Procedures Guide CONTACT INFORMATION Your comments and questions are valued and encouraged. Contact the author at: Britney Gilbert Juniper Tree Consulting, LLC Britney.Gilbert@JuniperTreeConsulting.com SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. indicates USA registration. Other brand and product names are trademarks of their respective companies. 7
A Breeze through SAS options to Enter a Zero-filled row Kajal Tahiliani, ICON Clinical Research, Warrington, PA
ABSTRACT: A Breeze through SAS options to Enter a Zero-filled row Kajal Tahiliani, ICON Clinical Research, Warrington, PA Programmers often need to summarize data into tables as per template. But study
More informationA Practical and Efficient Approach in Generating AE (Adverse Events) Tables within a Clinical Study Environment
A Practical and Efficient Approach in Generating AE (Adverse Events) Tables within a Clinical Study Environment Abstract Jiannan Hu Vertex Pharmaceuticals, Inc. When a clinical trial is at the stage of
More informationUsing PROC SQL to Generate Shift Tables More Efficiently
ABSTRACT SESUG Paper 218-2018 Using PROC SQL to Generate Shift Tables More Efficiently Jenna Cody, IQVIA Shift tables display the change in the frequency of subjects across specified categories from baseline
More informationLet s Get FREQy with our Statistics: Data-Driven Approach to Determining Appropriate Test Statistic
PharmaSUG 2018 - Paper EP-09 Let s Get FREQy with our Statistics: Data-Driven Approach to Determining Appropriate Test Statistic Richann Watson, DataRich Consulting, Batavia, OH Lynn Mullins, PPD, Cincinnati,
More informationSorting big datasets. Do we really need it? Daniil Shliakhov, Experis Clinical, Kharkiv, Ukraine
PharmaSUG 2015 - Paper QT21 Sorting big datasets. Do we really need it? Daniil Shliakhov, Experis Clinical, Kharkiv, Ukraine ABSTRACT Very often working with big data causes difficulties for SAS programmers.
More informationClinical Data Visualization using TIBCO Spotfire and SAS
ABSTRACT SESUG Paper RIV107-2017 Clinical Data Visualization using TIBCO Spotfire and SAS Ajay Gupta, PPD, Morrisville, USA In Pharmaceuticals/CRO industries, you may receive requests from stakeholders
More information%ANYTL: A Versatile Table/Listing Macro
Paper AD09-2009 %ANYTL: A Versatile Table/Listing Macro Yang Chen, Forest Research Institute, Jersey City, NJ ABSTRACT Unlike traditional table macros, %ANTL has only 3 macro parameters which correspond
More informationHow Macro Design and Program Structure Impacts GPP (Good Programming Practice) in TLF Coding
How Macro Design and Program Structure Impacts GPP (Good Programming Practice) in TLF Coding Galyna Repetatska, Kyiv, Ukraine PhUSE 2016, Barcelona Agenda Number of operations for SAS processor: between
More informationCleaning Duplicate Observations on a Chessboard of Missing Values Mayrita Vitvitska, ClinOps, LLC, San Francisco, CA
Cleaning Duplicate Observations on a Chessboard of Missing Values Mayrita Vitvitska, ClinOps, LLC, San Francisco, CA ABSTRACT Removing duplicate observations from a data set is not as easy as it might
More informationPROC MEANS for Disaggregating Statistics in SAS : One Input Data Set and One Output Data Set with Everything You Need
ABSTRACT Paper PO 133 PROC MEANS for Disaggregating Statistics in SAS : One Input Data Set and One Output Data Set with Everything You Need Imelda C. Go, South Carolina Department of Education, Columbia,
More informationUsing PROC SQL to Calculate FIRSTOBS David C. Tabano, Kaiser Permanente, Denver, CO
Using PROC SQL to Calculate FIRSTOBS David C. Tabano, Kaiser Permanente, Denver, CO ABSTRACT The power of SAS programming can at times be greatly improved using PROC SQL statements for formatting and manipulating
More informationThe Proc Transpose Cookbook
ABSTRACT PharmaSUG 2017 - Paper TT13 The Proc Transpose Cookbook Douglas Zirbel, Wells Fargo and Co. Proc TRANSPOSE rearranges columns and rows of SAS datasets, but its documentation and behavior can be
More informationSetting the Percentage in PROC TABULATE
SESUG Paper 193-2017 Setting the Percentage in PROC TABULATE David Franklin, QuintilesIMS, Cambridge, MA ABSTRACT PROC TABULATE is a very powerful procedure which can do statistics and frequency counts
More informationMapping Clinical Data to a Standard Structure: A Table Driven Approach
ABSTRACT Paper AD15 Mapping Clinical Data to a Standard Structure: A Table Driven Approach Nancy Brucken, i3 Statprobe, Ann Arbor, MI Paul Slagle, i3 Statprobe, Ann Arbor, MI Clinical Research Organizations
More informationDitch the Data Memo: Using Macro Variables and Outer Union Corresponding in PROC SQL to Create Data Set Summary Tables Andrea Shane MDRC, Oakland, CA
ABSTRACT Ditch the Data Memo: Using Macro Variables and Outer Union Corresponding in PROC SQL to Create Data Set Summary Tables Andrea Shane MDRC, Oakland, CA Data set documentation is essential to good
More informationCreating an ADaM Data Set for Correlation Analyses
PharmaSUG 2018 - Paper DS-17 ABSTRACT Creating an ADaM Data Set for Correlation Analyses Chad Melson, Experis Clinical, Cincinnati, OH The purpose of a correlation analysis is to evaluate relationships
More informationSAS Macros for Grouping Count and Its Application to Enhance Your Reports
SAS Macros for Grouping Count and Its Application to Enhance Your Reports Shi-Tao Yeh, EDP Contract Services, Bala Cynwyd, PA ABSTRACT This paper provides two SAS macros, one for one grouping variable,
More informationA Quick and Gentle Introduction to PROC SQL
ABSTRACT Paper B2B 9 A Quick and Gentle Introduction to PROC SQL Shane Rosanbalm, Rho, Inc. Sam Gillett, Rho, Inc. If you are afraid of SQL, it is most likely because you haven t been properly introduced.
More informationCreating Forest Plots Using SAS/GRAPH and the Annotate Facility
PharmaSUG2011 Paper TT12 Creating Forest Plots Using SAS/GRAPH and the Annotate Facility Amanda Tweed, Millennium: The Takeda Oncology Company, Cambridge, MA ABSTRACT Forest plots have become common in
More informationThe Power of Combining Data with the PROC SQL
ABSTRACT Paper CC-09 The Power of Combining Data with the PROC SQL Stacey Slone, University of Kentucky Markey Cancer Center Combining two data sets which contain a common identifier with a MERGE statement
More informationAmie Bissonett, inventiv Health Clinical, Minneapolis, MN
PharmaSUG 2013 - Paper TF12 Let s get SAS sy Amie Bissonett, inventiv Health Clinical, Minneapolis, MN ABSTRACT The SAS language has a plethora of procedures, data step statements, functions, and options
More informationODS DOCUMENT, a practical example. Ruurd Bennink, OCS Consulting B.V., s-hertogenbosch, the Netherlands
Paper CC01 ODS DOCUMENT, a practical example Ruurd Bennink, OCS Consulting B.V., s-hertogenbosch, the Netherlands ABSTRACT The ODS DOCUMENT destination (in short ODS DOCUMENT) is perhaps the most underutilized
More informationSubmitting SAS Code On The Side
ABSTRACT PharmaSUG 2013 - Paper AD24-SAS Submitting SAS Code On The Side Rick Langston, SAS Institute Inc., Cary NC This paper explains the new DOSUBL function and how it can submit SAS code to run "on
More informationThere s No Such Thing as Normal Clinical Trials Data, or Is There? Daphne Ewing, Octagon Research Solutions, Inc., Wayne, PA
Paper HW04 There s No Such Thing as Normal Clinical Trials Data, or Is There? Daphne Ewing, Octagon Research Solutions, Inc., Wayne, PA ABSTRACT Clinical Trials data comes in all shapes and sizes depending
More informationPaper HOW-06. Tricia Aanderud, And Data Inc, Raleigh, NC
Paper HOW-06 Building Your First SAS Stored Process Tricia Aanderud, And Data Inc, Raleigh, NC ABSTRACT Learn how to convert a simple SAS macro into three different stored processes! Using examples from
More informationMultiple Facts about Multilabel Formats
Multiple Facts about Multilabel Formats Gwen D. Babcock, ew York State Department of Health, Troy, Y ABSTRACT PROC FORMAT is a powerful procedure which allows the viewing and summarizing of data in various
More informationIt s Proc Tabulate Jim, but not as we know it!
Paper SS02 It s Proc Tabulate Jim, but not as we know it! Robert Walls, PPD, Bellshill, UK ABSTRACT PROC TABULATE has received a very bad press in the last few years. Most SAS Users have come to look on
More informationGet Started Writing SAS Macros Luisa Hartman, Jane Liao, Merck Sharp & Dohme Corp.
Get Started Writing SAS Macros Luisa Hartman, Jane Liao, Merck Sharp & Dohme Corp. ABSTRACT The SAS Macro Facility is a tool which lends flexibility to your SAS code and promotes easier maintenance. It
More informationCMISS the SAS Function You May Have Been MISSING Mira Shapiro, Analytic Designers LLC, Bethesda, MD
ABSTRACT SESUG 2016 - RV-201 CMISS the SAS Function You May Have Been MISSING Mira Shapiro, Analytic Designers LLC, Bethesda, MD Those of us who have been using SAS for more than a few years often rely
More informationQuality Control of Clinical Data Listings with Proc Compare
ABSTRACT Quality Control of Clinical Data Listings with Proc Compare Robert Bikwemu, Pharmapace, Inc., San Diego, CA Nicole Wallstedt, Pharmapace, Inc., San Diego, CA Checking clinical data listings with
More informationChecking for Duplicates Wendi L. Wright
Checking for Duplicates Wendi L. Wright ABSTRACT This introductory level paper demonstrates a quick way to find duplicates in a dataset (with both simple and complex keys). It discusses what to do when
More informationA Practical Introduction to SAS Data Integration Studio
ABSTRACT A Practical Introduction to SAS Data Integration Studio Erik Larsen, Independent Consultant, Charleston, SC Frank Ferriola, Financial Risk Group, Cary, NC A useful and often overlooked tool which
More informationUnlock SAS Code Automation with the Power of Macros
SESUG 2015 ABSTRACT Paper AD-87 Unlock SAS Code Automation with the Power of Macros William Gui Zupko II, Federal Law Enforcement Training Centers SAS code, like any computer programming code, seems to
More informationGet SAS sy with PROC SQL Amie Bissonett, Pharmanet/i3, Minneapolis, MN
PharmaSUG 2012 - Paper TF07 Get SAS sy with PROC SQL Amie Bissonett, Pharmanet/i3, Minneapolis, MN ABSTRACT As a data analyst for genetic clinical research, I was often working with familial data connecting
More informationSAS 9 Programming Enhancements Marje Fecht, Prowerk Consulting Ltd Mississauga, Ontario, Canada
SAS 9 Programming Enhancements Marje Fecht, Prowerk Consulting Ltd Mississauga, Ontario, Canada ABSTRACT Performance improvements are the well-publicized enhancement to SAS 9, but what else has changed
More informationSAS Macro Technique for Embedding and Using Metadata in Web Pages. DataCeutics, Inc., Pottstown, PA
Paper AD11 SAS Macro Technique for Embedding and Using Metadata in Web Pages Paul Gilbert, Troy A. Ruth, Gregory T. Weber DataCeutics, Inc., Pottstown, PA ABSTRACT This paper will present a technique to
More informationAutomating Preliminary Data Cleaning in SAS
Paper PO63 Automating Preliminary Data Cleaning in SAS Alec Zhixiao Lin, Loan Depot, Foothill Ranch, CA ABSTRACT Preliminary data cleaning or scrubbing tries to delete the following types of variables
More informationABSTRACT INTRODUCTION TRICK 1: CHOOSE THE BEST METHOD TO CREATE MACRO VARIABLES
An Efficient Method to Create a Large and Comprehensive Codebook Wen Song, ICF International, Calverton, MD Kamya Khanna, ICF International, Calverton, MD Baibai Chen, ICF International, Calverton, MD
More informationProgramming Gems that are worth learning SQL for! Pamela L. Reading, Rho, Inc., Chapel Hill, NC
Paper CC-05 Programming Gems that are worth learning SQL for! Pamela L. Reading, Rho, Inc., Chapel Hill, NC ABSTRACT For many SAS users, learning SQL syntax appears to be a significant effort with a low
More informationUseful Tips When Deploying SAS Code in a Production Environment
Paper SAS258-2014 Useful Tips When Deploying SAS Code in a Production Environment ABSTRACT Elena Shtern, SAS Institute Inc., Arlington, VA When deploying SAS code into a production environment, a programmer
More informationGetting Up to Speed with PROC REPORT Kimberly LeBouton, K.J.L. Computing, Rossmoor, CA
SESUG 2012 Paper HW-01 Getting Up to Speed with PROC REPORT Kimberly LeBouton, K.J.L. Computing, Rossmoor, CA ABSTRACT Learning the basics of PROC REPORT can help the new SAS user avoid hours of headaches.
More informationSquare Peg, Square Hole Getting Tables to Fit on Slides in the ODS Destination for PowerPoint
PharmaSUG 2018 - Paper DV-01 Square Peg, Square Hole Getting Tables to Fit on Slides in the ODS Destination for PowerPoint Jane Eslinger, SAS Institute Inc. ABSTRACT An output table is a square. A slide
More informationABSTRACT DATA CLARIFCIATION FORM TRACKING ORACLE TABLE INTRODUCTION REVIEW QUALITY CHECKS
Efficient SAS Quality Checks: Unique Error Identification And Enhanced Data Management Analysis Jim Grudzinski, Biostatistics Manager Of SAS Programming Covance Periapproval Services Inc, Radnor, PA ABSTRACT
More information%MISSING: A SAS Macro to Report Missing Value Percentages for a Multi-Year Multi-File Information System
%MISSING: A SAS Macro to Report Missing Value Percentages for a Multi-Year Multi-File Information System Rushi Patel, Creative Information Technology, Inc., Arlington, VA ABSTRACT It is common to find
More informationTweaking your tables: Suppressing superfluous subtotals in PROC TABULATE
ABSTRACT Tweaking your tables: Suppressing superfluous subtotals in PROC TABULATE Steve Cavill, NSW Bureau of Crime Statistics and Research, Sydney, Australia PROC TABULATE is a great tool for generating
More informationPharmaSUG China 2018 Paper AD-62
PharmaSUG China 2018 Paper AD-62 Decomposition and Reconstruction of TLF Shells - A Simple, Fast and Accurate Shell Designer Chengeng Tian, dmed Biopharmaceutical Co., Ltd., Shanghai, China ABSTRACT Table/graph
More informationUsing Templates Created by the SAS/STAT Procedures
Paper 081-29 Using Templates Created by the SAS/STAT Procedures Yanhong Huang, Ph.D. UMDNJ, Newark, NJ Jianming He, Solucient, LLC., Berkeley Heights, NJ ABSTRACT SAS procedures provide a large quantity
More informationGoing Under the Hood: How Does the Macro Processor Really Work?
Going Under the Hood: How Does the Really Work? ABSTRACT Lisa Lyons, PPD, Inc Hamilton, NJ Did you ever wonder what really goes on behind the scenes of the macro processor, or how it works with other parts
More informationJourney to the center of the earth Deep understanding of SAS language processing mechanism Di Chen, SAS Beijing R&D, Beijing, China
Journey to the center of the earth Deep understanding of SAS language processing Di Chen, SAS Beijing R&D, Beijing, China ABSTRACT SAS is a highly flexible and extensible programming language, and a rich
More informationEfficient Elimination of Duplicate Data Using the MODIFY Statement
Paper 2426-2018 Efficient Elimination of Duplicate Data Using the MODIFY Statement ABSTRACT Paul M. Dorfman Independent Consultant, Jacksonville, FL Many an ETL transformation phase starts with cleaning
More informationInteractive Programming Using Task in SAS Studio
ABSTRACT PharmaSUG 2018 - Paper QT-10 Interactive Programming Using Task in SAS Studio Suwen Li, Hoffmann-La Roche Ltd., Mississauga, ON SAS Studio is a web browser-based application with visual point-and-click
More informationImplementing external file processing with no record delimiter via a metadata-driven approach
Paper 2643-2018 Implementing external file processing with no record delimiter via a metadata-driven approach Princewill Benga, F&P Consulting, Saint-Maur, France ABSTRACT Most of the time, we process
More informationTales from the Help Desk 6: Solutions to Common SAS Tasks
SESUG 2015 ABSTRACT Paper BB-72 Tales from the Help Desk 6: Solutions to Common SAS Tasks Bruce Gilsen, Federal Reserve Board, Washington, DC In 30 years as a SAS consultant at the Federal Reserve Board,
More informationThe Ins and Outs of %IF
Paper 1135-2017 The Ins and Outs of %IF M. Michelle Buchecker, ThotWave Technologies, LLC. ABSTRACT Have you ever had your macro code not work and you couldn't figure out why? Even something as simple
More informationUsing SAS/SCL to Create Flexible Programs... A Super-Sized Macro Ellen Michaliszyn, College of American Pathologists, Northfield, IL
Using SAS/SCL to Create Flexible Programs... A Super-Sized Macro Ellen Michaliszyn, College of American Pathologists, Northfield, IL ABSTRACT SAS is a powerful programming language. When you find yourself
More informationPharmaSUG Paper AD06
PharmaSUG 2012 - Paper AD06 A SAS Tool to Allocate and Randomize Samples to Illumina Microarray Chips Huanying Qin, Baylor Institute of Immunology Research, Dallas, TX Greg Stanek, STEEEP Analytics, Baylor
More informationA Lazy Programmer s Macro for Descriptive Statistics Tables
Paper SA19-2011 A Lazy Programmer s Macro for Descriptive Statistics Tables Matthew C. Fenchel, M.S., Cincinnati Children s Hospital Medical Center, Cincinnati, OH Gary L. McPhail, M.D., Cincinnati Children
More informationCreating Population Tree Charts (Using SAS/GRAPH Software) Robert E. Allison, Jr. and Dr. Moon W. Suh College of Textiles, N. C.
SESUG 1994 Creating Population Tree Charts (Using SAS/GRAPH Software) Robert E. Allison, Jr. and Dr. Moon W. Suh College of Textiles, N. C. State University ABSTRACT This paper describes a SAS program
More informationKEYWORDS Metadata, macro language, CALL EXECUTE, %NRSTR, %TSLIT
MWSUG 2017 - Paper BB15 Building Intelligent Macros: Driving a Variable Parameter System with Metadata Arthur L. Carpenter, California Occidental Consultants, Anchorage, Alaska ABSTRACT When faced with
More information%Addval: A SAS Macro Which Completes the Cartesian Product of Dataset Observations for All Values of a Selected Set of Variables
%Addval: A SAS Macro Which Completes the Cartesian Product of Dataset Observations for All Values of a Selected Set of Variables Rich Schiefelbein, PRA International, Lenexa, KS ABSTRACT It is often useful
More informationPROC FORMAT. CMS SAS User Group Conference October 31, 2007 Dan Waldo
PROC FORMAT CMS SAS User Group Conference October 31, 2007 Dan Waldo 1 Today s topic: Three uses of formats 1. To improve the user-friendliness of printed results 2. To group like data values without affecting
More informationAn Easy Route to a Missing Data Report with ODS+PROC FREQ+A Data Step Mike Zdeb, FSL, University at Albany School of Public Health, Rensselaer, NY
SESUG 2016 Paper BB-170 An Easy Route to a Missing Data Report with ODS+PROC FREQ+A Data Step Mike Zdeb, FSL, University at Albany School of Public Health, Rensselaer, NY ABSTRACT A first step in analyzing
More informationAdvanced Visualization using TIBCO Spotfire and SAS
PharmaSUG 2018 - Paper DV-04 ABSTRACT Advanced Visualization using TIBCO Spotfire and SAS Ajay Gupta, PPD, Morrisville, USA In Pharmaceuticals/CRO industries, you may receive requests from stakeholders
More informationSAS Visual Analytics Environment Stood Up? Check! Data Automatically Loaded and Refreshed? Not Quite
Paper SAS1952-2015 SAS Visual Analytics Environment Stood Up? Check! Data Automatically Loaded and Refreshed? Not Quite Jason Shoffner, SAS Institute Inc., Cary, NC ABSTRACT Once you have a SAS Visual
More informationUsing SAS software to shrink the data in your applications
Paper 991-2016 Using SAS software to shrink the data in your applications Ahmed Al-Attar, AnA Data Warehousing Consulting LLC, McLean, VA ABSTRACT This paper discusses the techniques I used at the Census
More informationStatistics and Data Analysis. Common Pitfalls in SAS Statistical Analysis Macros in a Mass Production Environment
Common Pitfalls in SAS Statistical Analysis Macros in a Mass Production Environment Huei-Ling Chen, Merck & Co., Inc., Rahway, NJ Aiming Yang, Merck & Co., Inc., Rahway, NJ ABSTRACT Four pitfalls are commonly
More informationCreating output datasets using SQL (Structured Query Language) only Andrii Stakhniv, Experis Clinical, Ukraine
ABSTRACT PharmaSUG 2015 Paper QT22 Andrii Stakhniv, Experis Clinical, Ukraine PROC SQL is one of the most powerful procedures in SAS. With this tool we can easily manipulate data and create a large number
More informationReady To Become Really Productive Using PROC SQL? Sunil K. Gupta, Gupta Programming, Simi Valley, CA
PharmaSUG 2012 - Paper HW04 Ready To Become Really Productive Using PROC SQL? Sunil K. Gupta, Gupta Programming, Simi Valley, CA ABSTRACT Using PROC SQL, can you identify at least four ways to: select
More informationPharmaSUG 2013 CC26 Automating the Labeling of X- Axis Sanjiv Ramalingam, Vertex Pharmaceuticals, Inc., Cambridge, MA
PharmaSUG 2013 CC26 Automating the Labeling of X- Axis Sanjiv Ramalingam, Vertex Pharmaceuticals, Inc., Cambridge, MA ABSTRACT Labeling of the X-axis usually involves a tedious axis statement specifying
More informationSAS Programs SAS Lecture 4 Procedures. Aidan McDermott, April 18, Outline. Internal SAS formats. SAS Formats
SAS Programs SAS Lecture 4 Procedures Aidan McDermott, April 18, 2006 A SAS program is in an imperative language consisting of statements. Each statement ends in a semi-colon. Programs consist of (at least)
More informationT.I.P.S. (Techniques and Information for Programming in SAS )
Paper PO-088 T.I.P.S. (Techniques and Information for Programming in SAS ) Kathy Harkins, Carolyn Maass, Mary Anne Rutkowski Merck Research Laboratories, Upper Gwynedd, PA ABSTRACT: This paper provides
More informationLet Hash SUMINC Count For You Joseph Hinson, Accenture Life Sciences, Berwyn, PA, USA
ABSTRACT PharmaSUG 2014 - Paper CC02 Let Hash SUMINC Count For You Joseph Hinson, Accenture Life Sciences, Berwyn, PA, USA Counting of events is inevitable in clinical programming and is easily accomplished
More informationABSTRACT INTRODUCTION MACRO. Paper RF
Paper RF-08-2014 Burst Reporting With the Help of PROC SQL Dan Sturgeon, Priority Health, Grand Rapids, Michigan Erica Goodrich, Priority Health, Grand Rapids, Michigan ABSTRACT Many SAS programmers need
More informationSummary Table for Displaying Results of a Logistic Regression Analysis
PharmaSUG 2018 - Paper EP-23 Summary Table for Displaying Results of a Logistic Regression Analysis Lori S. Parsons, ICON Clinical Research, Medical Affairs Statistical Analysis ABSTRACT When performing
More informationUsing PROC REPORT to Cross-Tabulate Multiple Response Items Patrick Thornton, SRI International, Menlo Park, CA
Using PROC REPORT to Cross-Tabulate Multiple Response Items Patrick Thornton, SRI International, Menlo Park, CA ABSTRACT This paper describes for an intermediate SAS user the use of PROC REPORT to create
More informationContents of SAS Programming Techniques
Contents of SAS Programming Techniques Chapter 1 About SAS 1.1 Introduction 1.1.1 SAS modules 1.1.2 SAS module classification 1.1.3 SAS features 1.1.4 Three levels of SAS techniques 1.1.5 Chapter goal
More informationBuilding Sequential Programs for a Routine Task with Five SAS Techniques
ABSTRACT SESUG Paper BB-139-2017 Building Sequential Programs for a Routine Task with Five SAS Techniques Gongmei Yu and Paul LaBrec, 3M Health Information Systems. When a task needs to be implemented
More informationKeeping Track of Database Changes During Database Lock
Paper CC10 Keeping Track of Database Changes During Database Lock Sanjiv Ramalingam, Biogen Inc., Cambridge, USA ABSTRACT Higher frequency of data transfers combined with greater likelihood of changes
More informationThe Power of PROC SQL Techniques and SAS Dictionary Tables in Handling Data
Paper PO31 The Power of PROC SQL Techniques and SAS Dictionary Tables in Handling Data MaryAnne DePesquo Hope, Health Services Advisory Group, Phoenix, Arizona Fen Fen Li, Health Services Advisory Group,
More informationData Manipulation with SQL Mara Werner, HHS/OIG, Chicago, IL
Paper TS05-2011 Data Manipulation with SQL Mara Werner, HHS/OIG, Chicago, IL Abstract SQL was developed to pull together information from several different data tables - use this to your advantage as you
More informationPROC REPORT Basics: Getting Started with the Primary Statements
Paper HOW07 PROC REPORT Basics: Getting Started with the Primary Statements Arthur L. Carpenter California Occidental Consultants, Oceanside, California ABSTRACT The presentation of data is an essential
More informationThe first approach to accessing pathology diagnostic information is the use of synoptic worksheets produced by the
ABSTRACT INTRODUCTION Expediting Access to Critical Pathology Data Leanne Goldstein, City of Hope, Duarte, CA Rebecca Ottesen, City of Hope, Duarte, CA Julie Kilburn, City of Hope, Duarte, CA Joyce Niland,
More informationPharmaceuticals, Health Care, and Life Sciences
Successful Lab Result Conversion for LAB Analysis Data with Minimum Effort Pushpa Saranadasa, Merck & Co., Inc. INTRODUCTION In the pharmaceutical industry, the statistical results of a clinical trial's
More informationDeveloping Data-Driven SAS Programs Using Proc Contents
Developing Data-Driven SAS Programs Using Proc Contents Robert W. Graebner, Quintiles, Inc., Kansas City, MO ABSTRACT It is often desirable to write SAS programs that adapt to different data set structures
More informationPREREQUISITES FOR EXAMPLES
212-2007 SAS Information Map Studio and SAS Web Report Studio A Tutorial Angela Hall, Zencos Consulting LLC, Durham, NC Brian Miles, Zencos Consulting LLC, Durham, NC ABSTRACT Find out how to provide the
More informationKeh-Dong Shiang, Department of Biostatistics & Department of Diabetes, City of Hope National Medical Center, Duarte, CA
Validating Data Via PROC SQL Keh-Dong Shiang, Department of Biostatistics & Department of Diabetes, City of Hope National Medical Center, Duarte, CA ABSTRACT The Structured Query Language (SQL) is a standardized
More informationOmitting Records with Invalid Default Values
Paper 7720-2016 Omitting Records with Invalid Default Values Lily Yu, Statistics Collaborative Inc. ABSTRACT Many databases include default values that are set inappropriately. These default values may
More informationLab #3. Viewing Data in SAS. Tables in SAS. 171:161: Introduction to Biostatistics Breheny
171:161: Introduction to Biostatistics Breheny Lab #3 The focus of this lab will be on using SAS and R to provide you with summary statistics of different variables with a data set. We will look at both
More informationPaper S Data Presentation 101: An Analyst s Perspective
Paper S1-12-2013 Data Presentation 101: An Analyst s Perspective Deanna Chyn, University of Michigan, Ann Arbor, MI Anca Tilea, University of Michigan, Ann Arbor, MI ABSTRACT You are done with the tedious
More informationUnderstanding and Applying Multilabel Formats
Understanding and Applying Multilabel Formats Presented By: Andrew H. Karp RTSUG Jan. 14, 2004 Sierra Information Services, Inc. 19229 Sonoma Highway #264 Sonoma, California 95476 USA 707 996 7380 SierraInfo
More informationAn Animated Guide: Proc Transpose
ABSTRACT An Animated Guide: Proc Transpose Russell Lavery, Independent Consultant If one can think about a SAS data set as being made up of columns and rows one can say Proc Transpose flips the columns
More informationEfficiently Join a SAS Data Set with External Database Tables
ABSTRACT Paper 2466-2018 Efficiently Join a SAS Data Set with External Database Tables Dadong Li, Michael Cantor, New York University Medical Center Joining a SAS data set with an external database is
More informationHow Macro Design and Program Structure Impacts GPP (Good Programming Practice) in TLF Coding
Paper CC06 How Macro Design and Program Structure Impacts GPP (Good Programming Practice) in TLF Coding Galyna Repetatska, Chiltern, Kyiv, Ukraine ABSTRACT Good program structure and macro design are critical
More informationFrom Just Shells to a Detailed Specification Document for Tables, Listings and Figures Supriya Dalvi, InVentiv Health Clinical, Mumbai, India
PharmaSUG 2014 - Paper IB07 From Just Shells to a Detailed Specification Document for Tables, Listings and Figures Supriya Dalvi, InVentiv Health Clinical, Mumbai, India ABSTRACT We are assigned a new
More informationPaper PO06. Building Dynamic Informats and Formats
Paper PO06 Building Dynamic Informats and Formats Michael Zhang, Merck & Co, Inc, West Point, PA ABSTRACT Using the FORMAT procedure to define informats and formats is a common task in SAS programming
More informationOne Project, Two Teams: The Unblind Leading the Blind
ABSTRACT PharmaSUG 2017 - Paper BB01 One Project, Two Teams: The Unblind Leading the Blind Kristen Reece Harrington, Rho, Inc. In the pharmaceutical world, there are instances where multiple independent
More informationCreate a Format from a SAS Data Set Ruth Marisol Rivera, i3 Statprobe, Mexico City, Mexico
PharmaSUG 2011 - Paper TT02 Create a Format from a SAS Data Set Ruth Marisol Rivera, i3 Statprobe, Mexico City, Mexico ABSTRACT Many times we have to apply formats and it could be hard to create them specially
More informationHands-On ADaM ADAE Development Sandra Minjoe, Accenture Life Sciences, Wayne, Pennsylvania Kim Minkalis, Accenture Life Sciences, Wayne, Pennsylvania
PharmaSUG 2014 - Paper HT03 Hands-On ADaM ADAE Development Sandra Minjoe, Accenture Life Sciences, Wayne, Pennsylvania Kim Minkalis, Accenture Life Sciences, Wayne, Pennsylvania ABSTRACT The Analysis Data
More informationTired of CALL EXECUTE? Try DOSUBL
ABSTRACT SESUG Paper BB-132-2017 Tired of CALL EXECUTE? Try DOSUBL Jueru Fan, PPD, Morrisville, NC DOSUBL was first introduced as a function in SAS V9.3. It enables the immediate execution of SAS code
More informationCover the Basics, Tool for structuring data checking with SAS Ole Zester, Novo Nordisk, Denmark
ABSTRACT PharmaSUG 2014 - Paper IB04 Cover the Basics, Tool for structuring data checking with SAS Ole Zester, Novo Nordisk, Denmark Data Cleaning and checking are essential parts of the Stat programmer
More information