Compute; Your Future with Proc Report

Similar documents
Using V9 ODS LAYOUT to Simplify Generation of Individual Case Summaries Ling Y. Chen, Rho, Inc., Newton, MA

PROC REPORT AN INTRODUCTION

From Just Shells to a Detailed Specification Document for Tables, Listings and Figures Supriya Dalvi, InVentiv Health Clinical, Mumbai, India

PharmaSUG Paper TT10 Creating a Customized Graph for Adverse Event Incidence and Duration Sanjiv Ramalingam, Octagon Research Solutions Inc.

Getting Up to Speed with PROC REPORT Kimberly LeBouton, K.J.L. Computing, Rossmoor, CA

Multiple Graphical and Tabular Reports on One Page, Multiple Ways to Do It Niraj J Pandya, CT, USA

%ANYTL: A Versatile Table/Listing Macro

PROC REPORT Basics: Getting Started with the Primary Statements

ODS/RTF Pagination Revisit

ODS or DDE for Data Presentation -- A Preliminary Comparison of Output from Different Sources John He, Cephalon, Inc.

PDF Multi-Level Bookmarks via SAS

There s No Such Thing as Normal Clinical Trials Data, or Is There? Daphne Ewing, Octagon Research Solutions, Inc., Wayne, PA

Clinical Data Visualization using TIBCO Spotfire and SAS

PharmaSUG Paper AD21

Creating Forest Plots Using SAS/GRAPH and the Annotate Facility

The Benefits of Traceability Beyond Just From SDTM to ADaM in CDISC Standards Maggie Ci Jiang, Teva Pharmaceuticals, Great Valley, PA

IT S THE LINES PER PAGE THAT COUNTS Jonathan Squire, C2RA, Cambridge, MA Johnny Tai, Comsys, Portage, MI

An Efficient Method to Create Titles for Multiple Clinical Reports Using Proc Format within A Do Loop Youying Yu, PharmaNet/i3, West Chester, Ohio

MULTI-WAY TABLES IN REPORT

SAS Macros for Grouping Count and Its Application to Enhance Your Reports

KEYWORDS Metadata, macro language, CALL EXECUTE, %NRSTR, %TSLIT

SAS CLINICAL SYLLABUS. DURATION: - 60 Hours

The REPORT Procedure CHAPTER 32

SUGI 29 Posters. Paper A Group Scatter Plot with Clustering Xiaoli Hu, Wyeth Consumer Healthcare., Madison, NJ

A Practical and Efficient Approach in Generating AE (Adverse Events) Tables within a Clinical Study Environment

Indenting with Style

A Macro To Generate a Study Report Hany Aboutaleb, Biogen Idec, Cambridge, MA

Basic Concepts #6: Introduction to Report Writing

Advanced PROC REPORT: Getting Your Tables Connected Using Links

A Novel Approach to Developing a Patient Profile Reporting Application Steve Light and Paul Gilbert - DataCeutics Inc Guy Genereux - Sepracor Inc

Run your reports through that last loop to standardize the presentation attributes

Using MACRO and SAS/GRAPH to Efficiently Assess Distributions. Paul Walker, Capital One

Are you Still Afraid of Using Arrays? Let s Explore their Advantages

Automated Macros to Extract Data from the National (Nationwide) Inpatient Sample (NIS)

Statistics and Data Analysis. Common Pitfalls in SAS Statistical Analysis Macros in a Mass Production Environment

Prove QC Quality Create SAS Datasets from RTF Files Honghua Chen, OCKHAM, Cary, NC

SAS Graphs in Small Multiples Andrea Wainwright-Zimmerman, Capital One, Richmond, VA

Justina M. Flavin, Synteract, Inc.

PharmaSUG Paper PO12

Utilizing SAS for Cross- Report Verification in a Clinical Trials Setting

Advanced Visualization using TIBCO Spotfire and SAS

The Fantastic Four: Running Your Report Using the TABULATE, TRANSPOSE, REPORT, or SQL Procedure

Coders' Corner. Paper ABSTRACT GLOBAL STATEMENTS INTRODUCTION

Compute Blocks in Report

Essential ODS Techniques for Creating Reports in PDF Patrick Thornton, SRI International, Menlo Park, CA

It s Not All Relative: SAS/Graph Annotate Coordinate Systems

Standard Safety Visualization Set-up Using Spotfire

Combining TLFs into a Single File Deliverable William Coar, Axio Research, Seattle, WA

STEP 1 - /*******************************/ /* Manipulate the data files */ /*******************************/ <<SAS DATA statements>>

Facilitating Data Integration for Regulatory Submissions

PharmaSUG China 2018 Paper AD-62

Real Time Clinical Trial Oversight with SAS

Effective Forecast Visualization With SAS/GRAPH Samuel T. Croker, Lexington, SC

Tools to Facilitate the Creation of Pooled Clinical Trials Databases

Automate Clinical Trial Data Issue Checking and Tracking

A Macro to replace PROC REPORT!?

Paper: PO19 ARROW Statistical Graphic System ABSTRACT INTRODUCTION pagesize=, layout=, textsize=, lines=, symbols=, outcolor=, outfile=,

Codelists Here, Versions There, Controlled Terminology Everywhere Shelley Dunn, Regulus Therapeutics, San Diego, California

Clip Extreme Values for a More Readable Box Plot Mary Rose Sibayan, PPD, Manila, Philippines Thea Arianna Valerio, PPD, Manila, Philippines

Programming Gems that are worth learning SQL for! Pamela L. Reading, Rho, Inc., Chapel Hill, NC

Arthur L. Carpenter California Occidental Consultants, Oceanside, California

TLFs: Replaying Rather than Appending William Coar, Axio Research, Seattle, WA

Tips and Tricks in Creating Graphs Using PROC GPLOT

Creating output datasets using SQL (Structured Query Language) only Andrii Stakhniv, Experis Clinical, Ukraine

Quick Results with the Output Delivery System

Data Annotations in Clinical Trial Graphs Sudhir Singh, i3 Statprobe, Cary, NC

Paper An Automated Reporting Macro to Create Cell Index An Enhanced Revisit. Shi-Tao Yeh, GlaxoSmithKline, King of Prussia, PA

Paper PO07. %RiTEN. Duong Tran, Independent Consultant, London, Great Britain

Create Flowcharts Using Annotate Facility. Priya Saradha & Gurubaran Veeravel

An Efficient Tool for Clinical Data Check

An Introduction to PROC REPORT

A SAS Macro to Generate Caterpillar Plots. Guochen Song, i3 Statprobe, Cary, NC

Validation Summary using SYSINFO

Data Edit-checks Integration using ODS Tagset Niraj J. Pandya, Element Technologies Inc., NJ Vinodh Paida, Impressive Systems Inc.

CC13 An Automatic Process to Compare Files. Simon Lin, Merck & Co., Inc., Rahway, NJ Huei-Ling Chen, Merck & Co., Inc., Rahway, NJ

Making a List, Checking it Twice (Part 1): Techniques for Specifying and Validating Analysis Datasets

Using PROC FCMP to the Fullest: Getting Started and Doing More

%MAKE_IT_COUNT: An Example Macro for Dynamic Table Programming Britney Gilbert, Juniper Tree Consulting, Porter, Oklahoma

Data Quality Review for Missing Values and Outliers

PharmaSUG China

Get SAS sy with PROC SQL Amie Bissonett, Pharmanet/i3, Minneapolis, MN

Paper Abstract. Introduction. SAS Version 7/8 Web Tools. Using ODS to Create HTML Formatted Output. Background

Using PROC REPORT to Cross-Tabulate Multiple Response Items Patrick Thornton, SRI International, Menlo Park, CA

Fly over, drill down, and explore

When Simpler is Better Visualizing Laboratory Data Using SG Procedures Wei Cheng, Isis Pharmaceuticals, Inc., Carlsbad, CA

PharmaSUG Paper SP04

Easing into Data Exploration, Reporting, and Analytics Using SAS Enterprise Guide

Developing Data-Driven SAS Programs Using Proc Contents

186 Statistics, Data Analysis and Modeling. Proceedings of MWSUG '95

Hands-On ADaM ADAE Development Sandra Minjoe, Accenture Life Sciences, Wayne, Pennsylvania Kim Minkalis, Accenture Life Sciences, Wayne, Pennsylvania

ABC s of Graphs in Version 8 Caroline Bahler, Meridian Software, Inc.

Using PROC FCMP to the Fullest: Getting Started and Doing More

Hands-On ADaM ADAE Development Sandra Minjoe, Accenture Life Sciences, Wayne, Pennsylvania

PharmaSUG 2013 CC26 Automating the Labeling of X- Axis Sanjiv Ramalingam, Vertex Pharmaceuticals, Inc., Cambridge, MA

A Generalized Procedure to Create SAS /Graph Error Bar Plots

Programmatic Automation of Categorizing and Listing Specific Clinical Terms

EXAMPLES OF DATA LISTINGS AND CLINICAL SUMMARY TABLES USING PROC REPORT'S BATCH LANGUAGE

Manipulating Statistical and Other Procedure Output to Get the Results That You Need

Macro Quoting: Which Function Should We Use? Pengfei Guo, MSD R&D (China) Co., Ltd., Shanghai, China

OS/390 SAS/MXG Computer Performance Reports in HTML Format

Transcription:

Paper PO10 Compute; Your Future with Proc Report Ian J Dixon, GlaxoSmithKline, Harlow, UK Suzanne E Johnes, GlaxoSmithKline, Harlow, UK ABSTRACT PROC REPORT is widely used within the pharmaceutical industry to summarise and list clinical trial data. This paper will focus on the COMPUTE statement available within this SAS procedure and will highlight the wideranging use of this facility. INTRODUCTION This paper will explore six examples that demonstrate the COMPUTE statement within PROC REPORT and illustrate its usage in a Pharmaceutical context. EXAMPLES 1. Computing columns based on statistics 2. Creating flagging variables according to abnormal results 3. Producing a customised summary on each page 4. Varying footnotes by page 5. Creating page numbers 6. Displaying a graph and report on a single page PROC REPORT SYNTAX PROC REPORT <DATA= > <OUT= > WINDOWS NOWINDOWS; COLUMN column-specifications; DEFINE variable / <usage> <attributes> <options> <justification> < column-header >; BREAK location break-variable < / break-options >; RBREAK location < / break-options >; COMPUTE location < break-variable >; LINE specifications; ENDCOMP; COMPUTE report-item < / type-specification >; CALL DEFINE (column-id, attribute-name, value); ENDCOMP; RUN; BY < descending > variable; 1

1. COMPUTING COLUMNS BASED ON STATISTICS It is often necessary for body mass index (BMI) to be included in Demography listings. Body Mass Index is calculated as weight (kg) divided by height squared (m 2 ). The COMPUTE statement can be used to derive this variable and then display it in the final listing. proc report data=demo spacing=2 split= * nowd headskip headline ps=43 ls=108; column subject treat age sex ethnic height weight bmi; define subject / left group order Subject ; define treat / left group order Treatment*Sequence ; define age / left order Age*(yrs) ; define sex / left order Sex ; define ethnic / left order Ethnicity ; define height / left display Height*(m) ; define weight / left display Weight*(kg) ; define bmi / left computed format=6.2 BMI*(kg/m^2) ; compute bmi; bmi = weight / (height*height); Output: Listing of Demographic Characteristics Treatment Age Height Weight BMI Subject Sequence (yrs) Sex Ethnicity (m) (kg) (kg/m^2) ------------------------------------------------------------------------------------ 1 A/B 31 F Hispanic or Latino 1.58 62.5 25.04 2 B/A 23 F Not Hispanic or Latino 1.64 60.0 22.31 3 A/B 25 M Not Hispanic or Latino 1.80 72.5 22.38 4 A/B 25 M Not Hispanic or Latino 1.80 67.8 20.93 5 B/A 20 F Not Hispanic or Latino 1.75 86.0 28.08 6 B/A 20 M Not Hispanic or Latino 1.91 79.3 21.74 7 B/A 20 F Not Hispanic or Latino 1.72 69.5 23.49 8 A/B 22 F Not Hispanic or Latino 1.65 54.0 19.83 9 B/A 32 M Not Hispanic or Latino 1.82 86.5 26.11 10 A/B 20 F Not Hispanic or Latino 1.58 64.0 25.64 2. CREATING FLAGGING VARIABLES ACCORDING TO ABNORMAL RESULTS The COMPUTE statement can be used in PROC REPORT to attach flags to abnormal values. These types of output are commonly produced for listing ECG, Vital signs and Lab results. The SAS code below attaches High/Low flags to heart rate values outside the pre-defined potential clinical concern (PCC) range. It is important to ensure that the DISPLAY option is included on the variables used in COMPUTE blocks. In this example, the heartccd (Heart rate clinical concern code with value H for high and L for low) and heart (Heart rate in beats per minute) variables are used in the COMPUTE block. It is also necessary to list these variables prior to the computed variable in the columns statement. Finally, the character option will need to be used on the COMPUTE statement as heartpci is a computed character variable (it is derived by concatenating heart and heartccd). A COMPUTE AFTER statement is used to add a footnote to the table to define the flags. 2

proc report data=vitals spacing=2 split= * nowd headskip headline ps=43 ls=108; column subject treat vsactdy vsdt vsacttm visitnum visit heartccd heart heartpci; define subject / left group order Subject ; define treat / left group order width=7 Treatment*Sequence flow; define vsactdy / left order width=5 Study*Day ; define vsdt / left order Date ; define vsacttm / left order Time ; define visitnum / order noprint; define visit / left width=17 Visit flow; define heartccd / display noprint; define heart / display noprint; define heartpci / left computed width=8 Heart*Rate (bpm) ; break after subject /skip; compute heartpci / character length=20; if heartccd in ( H L ) then heartpci=trim(left(heart)) trim(left(heartccd)); else heartpci=trim(left(heart)); compute after _page_ / left; text1= H=High, L=Low ; line text1 $108.0; Output: Listing of Heart Rate values for subjects with Abnormalities of Potential Clinical Concern Treatment Study Heart Subject Sequence Day Date Time Visit Rate (bpm) ----------------------------------------------------------------------------- 1 A/B -14 05JUL2006 10:06 SCREENING 84 1 20JUL2006 10:11 PERIOD 1 DAY 1 72 2 21JUL2006 10:09 PERIOD 1 DAY 2 79 10 29JUL2006 10:25 PERIOD 2 DAY 1 60 11 30JUL2006 10:02 PERIOD 2 DAY 2 39 L 24 12AUG2006 11:15 FOLLOW-UP 45 2 B/A -14 08JUL2006 13:52 SCREENING 88 1 23JUL2006 13:36 PERIOD 1 DAY 1 110 H 2 24JUL2006 14:02 PERIOD 1 DAY 2 90 10 01AUG2006 13:12 PERIOD 2 DAY 1 95 11 02AUG2006 12:57 PERIOD 2 DAY 2 89 20 11AUG2006 12:59 FOLLOW-UP 87 3 A/B -14 12JUL2006 08:06 SCREENING 84 1 27JUL2006 08:36 PERIOD 1 DAY 1 72 2 28JUL2006 08:51 PERIOD 1 DAY 2 79 10 05AUG2006 08:20 PERIOD 2 DAY 1 60 11 06AUG2006 08:14 PERIOD 2 DAY 2 58 21 16AUG2006 09:04 FOLLOW-UP 39 L H=High, L=Low 3

3. PRODUCING A CUSTOMISED SUMMARY ON EACH PAGE It is often useful to be able to add subheadings at the beginning of each page of the report to summarise by a particular variable within your data. For example, the COMPUTE block in PROC REPORT can be used to summarise data by cohort. The study used in this example has two cohorts. options nobyline; proc sort data=pkcnc; by cohort; proc report data=pkcnc spacing=2 split= * nowd headskip headline ps=43 ls=108; by cohort; column cohort visit bign time n impute mean std median min max; define cohort / order=internal id spacing=2 width=1 format=$108.0 noprint; define visit / left group Visit ; define bign / left group width=4 format=2. N ; define time / left group Planned*Relative*Time ; define n / left n ; define impute / left Number*Imputed ; define mean / left Mean ; define std / left SD ; define median / left Median ; define min / left Min. ; define max / left Max. ; compute before _page_ / left; line Cohort = cohort $108.0; compute after _page_ / left; text = &sysuserid: &ProjectPath\Program\Analysis\&_program..sas %sysfunc(datetime(),datetime.) ; line @1 text $108.0; 4

Output: Summary of Plasma ABC123456 Pharmacokinetic Concentration-Time Data (ng/ml) Cohort = Cohort 1 Page 1 of 2 Planned Relative Number Visit N Time n Imputed Mean SD Median Min. Max. ------------------------------------------------------------------------------- DAY 1 14 PRE-DOSE 1 14 1 3.519 1.3696 3.640 0.00 5.45 1 H 14 0 5.858 2.0927 5.895 2.81 10.01 2 H 14 0 8.673 2.9289 8.550 4.53 13.74 4 H 14 0 10.575 2.8155 10.365 6.66 17.15 6 H 14 0 9.965 2.4304 9.420 7.06 15.25 8 H 14 0 8.224 2.0953 8.125 4.84 11.53 12 H 14 0 6.927 1.8188 7.300 3.60 9.47 24 H 14 0 5.051 1.5072 4.815 2.25 7.06 DAY 10 14 PRE-DOSE 1 14 0 9.641 3.0412 9.450 4.06 15.37 1 H 14 0 11.982 2.7164 11.440 7.08 17.26 2 H 14 0 14.702 3.3639 14.415 10.29 23.30 4 H 14 0 16.899 4.2662 16.315 12.18 28.71 6 H 14 0 15.861 4.4229 15.295 9.11 26.90 8 H 14 0 13.844 3.8512 12.805 6.79 22.38 12 H 14 0 11.514 3.6062 11.125 4.90 18.12 24 H 14 0 10.352 3.3572 10.065 4.00 16.49 ab12345: Project1\Program\Analysis\pktab.sas 30MAR07:11:27:46 Cohort = Cohort 2 Page 2 of 2 Planned Relative Number Visit N Time n Imputed Mean SD Median Min. Max. -------------------------------------------------------------------------------- DAY 1 14 PRE-DOSE 1 14 11 NQ NQ 0.00 1.87 1 H 14 2 1.729 0.7604 1.985 0.00 2.29 2 H 14 0 2.932 0.6217 2.755 2.18 4.24 4 H 14 0 3.290 0.5748 3.330 2.40 4.22 6 H 14 0 2.877 0.5284 2.790 2.25 4.08 8 H 14 1 2.358 0.9523 2.445 0.00 4.40 12 H 14 3 1.615 1.0466 1.760 0.00 3.79 24 H 14 11 NQ NQ 0.00 3.01 DAY 10 14 PRE-DOSE 1 14 3 1.939 1.2965 1.920 0.00 3.97 1 H 14 1 2.788 1.2681 2.855 0.00 5.11 2 H 14 0 3.925 0.9337 3.785 2.58 6.11 4 H 14 0 4.296 0.9897 4.310 2.84 6.01 6 H 14 0 4.081 1.1970 3.810 2.55 6.76 8 H 14 0 3.649 1.1661 3.300 2.29 5.93 12 H 14 1 2.882 1.5172 2.765 0.00 6.26 24 H 14 4 1.743 1.3055 1.890 0.00 3.79 ab12345: Project1\Program\Analysis\pktab.sas 30MAR07:11:27:46 5

4. VARYING FOOTNOTES BY PAGE For tables that span multiple pages, a common practice is to put a standard message such as See last page for footnotes at the bottom of each page except the last, and a complete listing of all footnotes at the bottom of the table on the final page. This can help to conserve page space if there are numerous footnotes. The code below shows the use of the COMPUTE and LINE statement to add footnotes in this way. The significant lines in the code are the after and after _page_ options in the COMPUTE statement. The after option executes at the end of the table; the after _page_ executes at the end of each page of the table. proc report data=pkcnc spacing=2 split= * nowd headskip headline ps=43 ls=108; column cohort bign visit time n impute mean std median min max; define cohort / left group Cohort ; define bign / left group width=4 format=2. N ; define visit / left group Visit ; define time / left group Planned*Relative*Time ; define n / left n ; define impute / left Number*Imputed ; define mean / left Mean ; define std / left SD ; define median / left Median ; define min / left Min. ; define max / left Max. ; break after visit; compute after; hold = x ; compute after _page_ / left; length text1 text2 text3 text4 $ 108; if hold= x then do; text1= Cohort 1: Day 1(Drug A Alone), Day 10(Drug A + Drug B 10mg). ; text2= Cohort 2: Day 1(Drug A Alone), Day 10(Drug A + Drug B 30mg). ; text3= If more than 30% of values are imputed, the standard deviation will not be displayed. ; text4= If the mean or median value is below the LLQ, it will be set to NQ. ; end; else text1= See last page for footnotes. ; line text1 $f108.; line text2 $f108.; line text3 $f108.; line text4 $f108.; 6

Output: Summary of Plasma ABC123456 Pharmacokinetic Concentration-Time Data (ng/ml) Page 1 of 2 Planned Relative Number Cohort N Visit Time n Imputed Mean SD Median Min. Max. ------------------------------------------------------------------------------- 1 14 DAY 1 PRE-DOSE 1 14 1 3.519 1.3696 3.640 0.00 5.45 1 H 14 0 5.858 2.0927 5.895 2.81 10.01 2 H 14 0 8.673 2.9289 8.550 4.53 13.74 4 H 14 0 10.575 2.8155 10.365 6.66 17.15 6 H 14 0 9.965 2.4304 9.420 7.06 15.25 8 H 14 0 8.224 2.0953 8.125 4.84 11.53 12 H 14 0 6.927 1.8188 7.300 3.60 9.47 24 H 14 0 5.051 1.5072 4.815 2.25 7.06 14 DAY 10 PRE-DOSE 1 14 0 9.641 3.0412 9.450 4.06 15.37 1 H 14 0 11.982 2.7164 11.440 7.08 17.26 2 H 14 0 14.702 3.3639 14.415 10.29 23.30 4 H 14 0 16.899 4.2662 16.315 12.18 28.71 6 H 14 0 15.861 4.4229 15.295 9.11 26.90 8 H 14 0 13.844 3.8512 12.805 6.79 22.38 12 H 14 0 11.514 3.6062 11.125 4.90 18.12 24 H 14 0 10.352 3.3572 10.065 4.00 16.49 See last page for footnotes. Page 2 of 2 Planned Relative Number Cohort N Visit Time n Imputed Mean SD Median Min. Max. -------------------------------------------------------------------------------- 2 14 DAY 1 PRE-DOSE 1 14 11 NQ NQ 0.00 1.87 1 H 14 2 1.729 0.7604 1.985 0.00 2.29 2 H 14 0 2.932 0.6217 2.755 2.18 4.24 4 H 14 0 3.290 0.5748 3.330 2.40 4.22 6 H 14 0 2.877 0.5284 2.790 2.25 4.08 8 H 14 1 2.358 0.9523 2.445 0.00 4.40 12 H 14 3 1.615 1.0466 1.760 0.00 3.79 24 H 14 11 NQ NQ 0.00 3.01 14 DAY 10 PRE-DOSE 1 14 3 1.939 1.2965 1.920 0.00 3.97 1 H 14 1 2.788 1.2681 2.855 0.00 5.11 2 H 14 0 3.925 0.9337 3.785 2.58 6.11 4 H 14 0 4.296 0.9897 4.310 2.84 6.01 6 H 14 0 4.081 1.1970 3.810 2.55 6.76 8 H 14 0 3.649 1.1661 3.300 2.29 5.93 12 H 14 1 2.882 1.5172 2.765 0.00 6.26 24 H 14 4 1.743 1.3055 1.890 0.00 3.79 Cohort 1: Day 1(Drug A Alone), Day 10(Drug A + Drug B 10mg). Cohort 2: Day 1(Drug A Alone), Day 10(Drug A + Drug B 30mg). If more than 30% of values are imputed, the standard deviation will not be displayed. If the mean or median value is below the LLQ, it will be set to NQ. 7

5. CREATING PAGE NUMBERS PROC REPORT has no direct options for printing the page number on a report. This example shows one method for addressing this problem using a single macro (called %pagenum) which can be used to write out Page x of y using the COMPUTE statement. The example uses an adverse events dataset to create a listing of adverse events with page numbers in the top right hand corner of each page. options nodate; %macro pagenum( code = /* Proc report code, quoted by %nrstr */ outfile = outfile /* Output file */ ); %global page pages label; /* First section */ %let page = 0; %let label = 10; /* 1a */ filename _outfile &outfile ; proc printto print = _outfile; %unquote(&code.) proc printto; filename _outfile clear; /* 1b */ /* Second section */ %let totpages = &page.; %let page = 0; %let label = %eval(%length(&totpages.)* 2 + 4); /* 1c */ %unquote(&code.) /* 1d */ %mend pagenum; /* Create an AE listing */ %pagenum(code=%nrstr( proc report data=ae spacing=2 split= * nowd headskip headline ps=43 ls=108; column subject treat aept aeterm aestdm aeendm aesev aeser; define subject / left group order Subject ; define treat / left group order Treatment ; define aept / left Preferred*Term ; define aeterm / left Verbatim*Text ; define aestdm / left Start*date/time ; define aeendm / left End*date/time ; define aesev / left Severity ; define aeser / left Serious*Y/N ; compute before _page_ / right; call execute( %let page = %eval(&page. + 1); ); /* 1e */ length _XofY $&label.; _XofY = symget( page ) of symget( totpages ); /* 1f */ line Page _XofY $char.; /* 1g */ )); 8

First section: The macro variable &page stores the current page number. The first section of the macro establishes the number of pages in the final output. The total number of pages is the same as the value of &page at the end of the first run. This is then stored in the macro variable &totpages. The results from this section are deleted (see 1b in the code above). The length of the X of Y string part of the page number text is assigned to the macro variable &label. The initial value of &label is arbitrary (1a). It is adjusted once the total number of pages is known (1c). Second section: The macro variable &page is reset to zero at the beginning of each run through of this section. The true length for the page number label ( X of Y part only) is calculated (1c), and then the PROC REPORT is run, generating the output (1d). The COMPUTE statement in the PROC REPORT increments &page (1e), creates a temporary variable called _XofY (1f) and finally outputs the page number text in the top right hand corner (1g). Output: Listing of Adverse Events (first page) Page 1 of 9 Preferred Verbatim Start End Serious Subject Treatment Term Text date/time date/time Severity Y/N ------------------------------------------------------------------------------------ -- 8 Placebo Headache Headache 09JUN2007: 10JUN2007: Mild N 16:15 10:13 13 Drug A Dizziness Dizziness 15JUN2007: 18JUN2007: Moderate N 09:15 15:30 25 Drug C Pharyngo- Sore throat 08JUN2007: 10JUN2007: Mild N laryngeal 20:45 23:05 pain 6. DISPLAYING A GRAPH AND REPORT ON A SINGLE PAGE It is often useful to be able to produce a plot and summary of data on the same page of output. The following code provides an example of weight plotted against height with a listing showing subject, height and weight displayed beneath it. The output is saved to an HTM file named report.htm using the SAS Output Delivery System (ODS). goptions device=gif xpixels=480 ypixels=360 gsfmode=replace; symbol1 v=star c=blue; axis1 label=(c=lib Height (m) ) order=(1.4 to 2.0 by 0.2); axis2 label=(c=lib Weight (kg) ) order=(40 to 110 by 10); proc gplot data=demo gout=work.chart; plot height*weight / name= chart vaxis=axis1 haxis=axis2; ods html body= c:\report.htm gpath= c:\ (URL=NONE) style=sasweb; proc report data=demo nowd split= * ; columns subject height weight; define subject / left display Subject ; define height / left display Height (m) ; define weight / left display Weight (kg) ; compute before _page_ / center; call define( _ROW_, GRSEG, work.chart.chart ); ods html close; 9

Output: Plot and listing for the first 10 subjects Subject Height (m) Weight (kg) 1 1.63 56.3 2 1.67 75.3 3 1.64 58.3 4 1.67 57.5 5 1.84 73.2 6 1.87 73.3 7 1.84 66.6 8 1.9 88 9 1.71 72 10 1.82 81.8 10

CONCLUSION This paper has illustrated a number of capabilities of the COMPUTE statement for presenting clinical trial results in the pharmaceutical industry. However, as with most SAS procedures there are alternative, but often less efficient, methods for achieving similar output. REFERENCES SAS OnlineDoc, Version 8. Chung, Chang Y "Page X of Y with PROC REPORT" 2005. paper cc31. Proceedings of the Pharmaceutical Industry SAS Users Group (PharmaSUG2005) Annual Conference. Pheonix, AZ. (with Toby Dunn). http://changchung.com/download/pagexofy_draft.pdf Chapman, David D (US Census Bureau, Washington, DC) Using Formats and Other Techniques to Complete PROC REPORT Tables paper 132-28. Proceedings of the SAS Users Group International (SUGI 28), Seattle, Washington. http://www2.sas.com/proceedings/sugi28/132-28.pdf Carpenter, Arthur L. (California Occidental Consultants) In the Compute Block: Issues Associated with Using and Naming Variables paper 025-2007, SAS Global Forum 2007-07-26 http://www2.sas.com/proceedings/forum2007/025-2007.pdf CONTACT INFORMATION Your comments and questions are valued and encouraged. Contact the authors at: Ian J Dixon & Suzanne E Johnes GlaxoSmithKline NFSP(South) Third Avenue Harlow, CM19 5AW UK Ian.j.dixon@gsk.com or suzanne.e.johnes@gsk.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. 11