sas proc report at work

Upload: nimit-mohan-narsipur

Post on 13-Oct-2015

55 views

Category:

Documents


1 download

DESCRIPTION

SAS Proc Report at Work

TRANSCRIPT

  • PROC REPORT

  • *IntroductionPROC REPORT is used to present data:

    TablesListing

  • *IntroductionExample

    TABLE 1

    SUMMARY OF PATIENT NUMBERS AND ANALYSIS SET MEMBERSHIP

    STUDY NUMBER: XXXXXXXX

    ____________________________________________________________________________________________________________________________________

    DRUG A DRUG B Overall

    ____________________________________________________________________________________________________________________________________

    Number of patients in the All Randomized Set 20 9 29

    Number of patients in the Safety Set 20 (100%) 8 (89%) 28 (97%)

    Number of patients in the Efficacy Set 17 (85%) 8 (89%) 25 (86%)

    Number of patients who completed the original 12-month study 17 (85%) 8 (89%) 25 (86%)

    Number of patients who did not complete the original 12-month study 3 (15%) 1 (11%) 4 (14%)

    Number of patients who entered the 12-month extension study 17 (85%) 8 (89%) 25 (86%)

    Number of patients who completed the 12-month extension study 15 (75%) 4 (44%) 19 (66%)

    Number of patients who did not complete the 12-month extension study 2 (10%) 4 (44%) 6 (21%)

    ____________________________________________________________________________________________________________________________________

    Produced: April 1, 2006, version 1. Page 1 of 1

    Source: Listings 1 and 2.

    Note: All patients who entered the 12-month extension study received DRUG B during this phase.

    The All Randomized Set includes all randomized patients regardless of whether patients assigned to DRUG B were treated.

    The Safety Set includes all randomized patients who received at least one dose of OGT 918 during the 24-month study period.

    The Efficacy Set includes all randomized patients that entered the 12-month extended period of the study and who have at least

    one post-baseline efficacy assessment during the 12-month extended period.

    Percentages are based on the number of patients in the All Randomized Set in each treatment group.

  • *Introduction - Presenting dataThere are a number of other ways of presenting our data, such as using:

    PROC PRINTPROC TABULATEPROC SUMMARY

  • *PROC REPORT WINDOWS ENVIROMENT (WD)Interactive windows environment.

    PROC REPORT DATA = final;RUN;

    Identify variables required to be presented.

    PROC REPORT DATA = final; COLUMN page charact order statnum statist drugA drugB overall; RUN;

  • *PROC REPORT WINDOWS ENVIROMENT (WD)

  • *PROC REPORT WINDOWS ENVIROMENT (WD)

  • *SYNTAXPROC REPORT ; BY variable-list; COLUMN column-list; DEFINE item; BREAK BEFORE|AFTER break-variable;

    COMPUTE BEFORE|AFTER ; LINE specification-list; ENDCOMP;RUN;

  • *SYNTAXPROC REPORT ; BY variable-list; COLUMN column-list; DEFINE item; BREAK BEFORE|AFTER break-variable;

    COMPUTE BEFORE|AFTER ; LINE specification-list; ENDCOMP;RUN;

  • *SYNTAXPROC REPORT ; BY variable-list; COLUMN column-list; DEFINE item; BREAK BEFORE|AFTER break-variable;

    COMPUTE BEFORE|AFTER ; LINE specification-list; ENDCOMP; RBREAK BEFORE|AFTER;RUN;

  • *The COLUMN statement PROC REPORT ; COLUMN column-list; RUN; This lists the items that appear in the columns of the report and describes the arrangement of the columns.

    NOTE:The order in which the variables are written is the order which thevariables are displayed in the report.

  • *Simple PROC REPORT Example 1TITLE1 "Proc REPORT training";TITLE2 "Basic Proc Report";PROC REPORT DATA=table_tr NOWD MISSING; COLUMN order reasonn trt1 trt2 trt3;RUN;QUIT; Proc REPORT training Basic Proc Report

    order reasonn trt1 trt2 trt3 1 . xx (xx.x%) xx (xx.x%) xx (xx.x%) 2 . xx (xx.x%) xx (xx.x%) xx (xx.x%) 4 1 xx (xx.x%) xx (xx.x%) xx (xx.x%) 4 2 xx (xx.x%) xx (xx.x%) xx (xx.x%) 4 3 xx (xx.x%) xx (xx.x%) xx (xx.x%) 4 4 xx (xx.x%) xx (xx.x%) xx (xx.x%) 4 5 xx (xx.x%) xx (xx.x%) xx (xx.x%) 4 6 xx (xx.x%) xx (xx.x%) xx (xx.x%) 4 7 xx (xx.x%) xx (xx.x%) xx (xx.x%) 4 8 xx (xx.x%) xx (xx.x%) xx (xx.x%) 4 9 xx (xx.x%) xx (xx.x%) xx (xx.x%) 4 10 xx (xx.x%) xx (xx.x%) xx (xx.x%) 5 . xx (xx.x%) xx (xx.x%) xx (xx.x%)

  • *Exercise 1.1. Create a simple proc report using the variablesSUBJECTVISITDOBRACESEX from RAW.DEMOG.

  • *The DEFINE statement PROC REPORT ; COLUMN column-list;DEFINE item / ; RUN; This defines the characteristics of an item in the report. These characteristics include the column header, the format to use to display values, and how the PROC REPORT uses the item in the report.

  • *The DEFINE statement - You can tell PROC REPORT how touse a variable, by using the following on the DEFINE statement:

    /

    DISPLAY - defaultORDERGROUPACROSSANALYSISCOMPUTED

  • *The DEFINE statement DISPLAY defaultThis defines the item, which must be a data set variable, as a display variable. (These do not affect the order of the rows in the report. The order of the rows reflects the order of the observations in the data set.)

    ORDERThis defines the item as an order variable.

    GROUP The defines the item as a group variable.

  • *Using DEFINE Example 2TITLE2 "Using DEFINE statements";TITLE3 "Ordering the output using our Primary and Secondary order variables";PROC REPORT DATA=table_tr NOWD MISSING; COLUMN order reasonn trt1 trt2 trt3; DEFINE order / ORDER; DEFINE reasonn / ORDER; DEFINE trt1 / DISPLAY; DEFINE trt2 / DISPLAY; DEFINE trt3 / DISPLAY;RUN;QUIT; Using DEFINE statements Ordering the output using our Primary and Secondary order variables

    order reasonn trt1 trt2 trt3 1 . xx (xx.x%) xx (xx.x%) xx (xx.x%) 2 . xx (xx.x%) xx (xx.x%) xx (xx.x%) 4 1 xx (xx.x%) xx (xx.x%) xx (xx.x%) 2 xx (xx.x%) xx (xx.x%) xx (xx.x%) 3 xx (xx.x%) xx (xx.x%) xx (xx.x%) 4 xx (xx.x%) xx (xx.x%) xx (xx.x%) 5 xx (xx.x%) xx (xx.x%) xx (xx.x%) 6 xx (xx.x%) xx (xx.x%) xx (xx.x%) 7 xx (xx.x%) xx (xx.x%) xx (xx.x%) 8 xx (xx.x%) xx (xx.x%) xx (xx.x%) 9 xx (xx.x%) xx (xx.x%) xx (xx.x%) 10 xx (xx.x%) xx (xx.x%) xx (xx.x%) 5 . xx (xx.x%) xx (xx.x%) xx (xx.x%)

  • *The DEFINE statement One of more attribute can be given to each defined item:

    /

    FORMATORDER=DATA|FORMATTED|FREQ|INTERNALSPACINGWIDTH

  • *The DEFINE statement FORMAT=format This assigns the SAS or user-defined format to the item.

    ORDER=DATA|FORMATTED|FREQ|INTERNAL The ORDER= option specifies the order in which the class variable values are displayed in each table. (Default value for order is FORMATTED). Possible values for order are as follows: INTERNAL the class values are ordered by the internal representation of the values. FREQ the class values are ordered by descending frequency count. DATA the class values are kept in the order they were encountered in the data set. FORMATTED the class values are ordered by the formatted value.

  • *The DEFINE statement SPACING=horizontal-positions [ Default=2] This defines the number of blank characters to leave between the column defined and the column immediately left.

    WIDTH=column-width This defines the width of the column in which PROC REPORT displays the item.

    Note: The sum of the column widths plus the spacing in the report can not exceed the line size.

  • *The DEFINE statement One of more option(s) can be given to each defined item:

    /

    DESCENDINGFLOWIDNOPRINTNOZEROPAGE

  • *The DEFINE statement DESCENDING Reverses the order in which the rows or values are displayed.

    FLOW Wraps the value of a character variable in its column

    ID Specifies that the item you are defining is an ID variable.

    NOPRINT Use if you want to display a variable in the report but need it to calculate other values particular used for ordering.

    NOZERO Suppresses the display of the variable if the values are all zero or missing.

    PAGEInserts a page break just before printing the first column containing values.

  • *The DEFINE statement One of the following can be given to each defined item:

    /

    CENTERLEFTRIGHT - default

  • *Using DEFINE Example 4TITLE3 "Using ORDER/REASONN variables to order output. Use DISCREAS to identify each row of table";PROC REPORT DATA=table_tr NOWD MISSING; COLUMN order reasonn discreas trt1 trt2 trt3; DEFINE order / ORDER NOPRINT; DEFINE reasonn / ORDER NOPRINT; DEFINE discreas / DISPLAY "REASON FOR DISCONTINUATION"; DEFINE trt1 / DISPLAY DRUG A"; DEFINE trt2 / DISPLAY DRUG B"; DEFINE trt3 / DISPLAY "TOTAL";RUN;QUIT; Basic Proc Report Using ORDER/REASONN variables to order output. Use DISCREAS to identify each row of table

    REASON FOR DISCONTINUATION DRUG A DRUG B TOTAL Number of subjects xx (xx.x%) xx (xx.x%) xx (xx.x%) Number of subjects who completed the entire trial xx (xx.x%) xx (xx.x%) xx (xx.x%) Primary reasons for premature discontinuation Primary reasons for premature discontinuation Did not meet screening assessments xx (xx.x%) xx (xx.x%) xx (xx.x%) Withdrawn by investigator xx (xx.x%) xx (xx.x%) xx (xx.x%) Withdrew consent xx (xx.x%) xx (xx.x%) xx (xx.x%) Adverse Events xx (xx.x%) xx (xx.x%) xx (xx.x%) Lack of therapeutic response xx (xx.x%) xx (xx.x%) xx (xx.x%) Lost to follow-up xx (xx.x%) xx (xx.x%) xx (xx.x%) Death xx (xx.x%) xx (xx.x%) xx (xx.x%) Medication non-compliance xx (xx.x%) xx (xx.x%) xx (xx.x%) Clinically significant test results xx (xx.x%) xx (xx.x%) xx (xx.x%) Other xx (xx.x%) xx (xx.x%) xx (xx.x%) Total number of withdrawals: xx (xx.x%) xx (xx.x%) xx (xx.x%)

  • *Using DEFINE Example 5TITLE3 "Using the SPACING & WIDTH options to "spread" the table over a width of 132";PROC REPORT DATA=table_tr NOWD MISSING HEADLINE HEADSKIP ; COLUMN order reasonn ("--" discreas ("- TREATMENT GROUP -" trt1 trt2) trt3); DEFINE order / ORDER NOPRINT; DEFINE reasonn / ORDER NOPRINT; DEFINE discreas / DISPLAY "REASON FOR DISCONTINUATION" WIDTH=51; DEFINE trt1 / DISPLAY DRUG A" WIDTH=15; DEFINE trt2 / DISPLAY DRUG B" WIDTH=15 SPACING=15; DEFINE trt3 / DISPLAY "TOTAL" WIDTH=15 SPACING=19;RUN;QUIT; Basic Proc Report Using the SPACING & WIDTH options to spread the table over a width of 132

    TREATMENT GROUP REASON FOR DISCONTINUATION DRUG A DRUG B TOTAL

    Number of subjects xx (xx.x%) xx (xx.x%) xx (xx.x%)Number of subjects who completed the entire trial xx (xx.x%) xx (xx.x%) xx (xx.x%)Primary reasons for premature discontinuationPrimary reasons for premature discontinuation Did not meet screening assessments xx (xx.x%) xx (xx.x%) xx (xx.x%) Withdrawn by investigator xx (xx.x%) xx (xx.x%) xx (xx.x%) Withdrew consent xx (xx.x%) xx (xx.x%) xx (xx.x%) Adverse Events xx (xx.x%) xx (xx.x%) xx (xx.x%) Lack of therapeutic response xx (xx.x%) xx (xx.x%) xx (xx.x%) Lost to follow-up xx (xx.x%) xx (xx.x%) xx (xx.x%) Death xx (xx.x%) xx (xx.x%) xx (xx.x%) Medication non-compliance xx (xx.x%) xx (xx.x%) xx (xx.x%) Clinically significant test results xx (xx.x%) xx (xx.x%) xx (xx.x%) Other xx (xx.x%) xx (xx.x%) xx (xx.x%)Total number of withdrawals: xx (xx.x%) xx (xx.x%) xx (xx.x%)

  • *Using DEFINE Example 6TITLE3 "Using the SPILT option to gain extra lines in the header";PROC REPORT DATA=table_tr NOWD MISSING HEADLINE HEADSKIP SPLIT='~' SPACING=16 LS=132 PS=40; COLUMN order reasonn ("--" discreas ("~- TREATMENT GROUP -" trt1 trt2) trt3); DEFINE page / ORDER NOPRINT; DEFINE order / ORDER NOPRINT; DEFINE reasonn / ORDER NOPRINT; DEFINE discreas / DISPLAY "~~REASON FOR DISCONTINUATION~ " WIDTH=51 SPACING=2 RIGHT; DEFINE trt1 / DISPLAY "DRUG A~ " WIDTH=12 SPACING=10 ; DEFINE trt2 / DISPLAY "DRUG B~ " WIDTH=12 ; DEFINE trt3 / DISPLAY "~~TOTAL~ " WIDTH=15;RUN;QUIT; Basic Proc Report Using the SPILT option to gain extra lines in the header

    TREATMENT GROUP REASON FOR DISCONTINUATION DRUG A DRUG B TOTAL

    Number of subjects xx (xx.x%) xx (xx.x%) xx (xx.x%) Number of subjects who completed the entire trial xx (xx.x%) xx (xx.x%) xx (xx.x%) Primary reasons for premature discontinuation Primary reasons for premature discontinuation Did not meet screening assessments xx (xx.x%) xx (xx.x%) xx (xx.x%) Withdrawn by investigator xx (xx.x%) xx (xx.x%) xx (xx.x%) Withdrew consent xx (xx.x%) xx (xx.x%) xx (xx.x%) Adverse Events xx (xx.x%) xx (xx.x%) xx (xx.x%) Lack of therapeutic response xx (xx.x%) xx (xx.x%) xx (xx.x%) Lost to follow-up xx (xx.x%) xx (xx.x%) xx (xx.x%) Death xx (xx.x%) xx (xx.x%) xx (xx.x%) Medication non-compliance xx (xx.x%) xx (xx.x%) xx (xx.x%) Clinically significant test results xx (xx.x%) xx (xx.x%) xx (xx.x%) Other xx (xx.x%) xx (xx.x%) xx (xx.x%) Total number of withdrawals: xx (xx.x%) xx (xx.x%) xx (xx.x%)

  • *Exercise 2.2. Using the following variables from RAW.PHYSEX SUBJECT, VISIT, VISDAT, PEXCAT, NORMABN Create a proc report which is ordered by SUBJECT, VISIT and VISDAT and where the other variables are displayed.

    2.A. Define the variable VISDAT by using the attribute Internal.

    2.B. Also display the variable COMMNT on the proc report. Define the following widths for each variable with a spacing of 2.

    SUBJECT=8, VISIT=21, VISDAT=12, PEXCAT=30, NORMABN=15, COMMNT=36.

    2.C. Apply the following column labels to each variable. SUBJECT=Subject, VISIT=Visit, VISDAT=Visit Date, PEXCAT=Examination, NORMABN=Normal/Abnormal COMMNT=Comments.

  • *The BREAK statement PROC REPORT ; COLUMN column-list;DEFINE item / ;BREAK BEFORE|AFTER break-variable /;RUN; BREAK creates a default summary at a break. A break is a change in the value of a group or order variable.

  • *The BREAK statement locationThe location controls the placements of the break lines.

    location

    AFTER- places the break lines immediately after the last row of each set of rows that have the same value for the break-variable.

    BEFORE - places the break lines immediately before the first row of each set of rows that have the same value for the break-variable.

  • *The BREAK statement break-variablebreak-variable

    The break-variable is a GROUP or ORDER variable. The REPORT procedure writes break lines each time the value of this variable changes.

  • *The BREAK statement One of more attribute can be given to each defined item:

    /

    SKIPPAGEDULDOLULOLSUMMARIZESUPRESSCOLOR=colour

  • *The BREAK statement

    SKIP - this writes a blank line for the last break line.PAGE this starts a new page after the last break line.

    DUL double underlining (default is = )DOL - double overlining (default is = )

    UL single underlining (default is - )OL - single overlining (default is - )

    SUMMARIZE this writes a summary line in each group of break lines.

    SUPRESS this suppresses printing of :The value of the break variable in the summary line.Any underlining and overlining in the break lines in the column containing the break variable.

    COLOR=colour

  • *Using BREAK Example 8 Basic Proc Report Using the BREAK AFTER block statement to add blank lines after each ORDER variable change

    TREATMENT GROUP REASON FOR DISCONTINUATION DRUG A DRUG B TOTAL

    Number of subjects xx (xx.x%) xx (xx.x%) xx (xx.x%)

    Number of subjects who completed the entire trial xx (xx.x%) xx (xx.x%) xx (xx.x%)

    Primary reasons for premature discontinuatios

    Did not meet screening assessments xx (xx.x%) xx (xx.x%) xx (xx.x%) Withdrawn by investigator xx (xx.x%) xx (xx.x%) xx (xx.x%) Withdrew consent xx (xx.x%) xx (xx.x%) xx (xx.x%) Adverse Events xx (xx.x%) xx (xx.x%) xx (xx.x%) Lack of therapeutic response xx (xx.x%) xx (xx.x%) xx (xx.x%) Lost to follow-up xx (xx.x%) xx (xx.x%) xx (xx.x%) Death xx (xx.x%) xx (xx.x%) xx (xx.x%) Medication non-compliance xx (xx.x%) xx (xx.x%) xx (xx.x%) Clinically significant test results xx (xx.x%) xx (xx.x%) xx (xx.x%) Other xx (xx.x%) xx (xx.x%) xx (xx.x%)

    Total number of withdrawals: xx (xx.x%) xx (xx.x%) xx (xx.x%) TITLE3 "Using the BREAK AFTER block statement to add blank lines after each ORDER variable change";PROC REPORT DATA=table_tr NOWD MISSING HEADLINE HEADSKIP; COLUMN order reasonn ("--" discreas ("- TREATMENT GROUP -" trt1 trt2) trt3); DEFINE order / ORDER NOPRINT; DEFINE reasonn / ORDER NOPRINT; DEFINE discreas / DISPLAY "REASON FOR DISCONTINUATION"; DEFINE trt1 / DISPLAY DRUG A"; DEFINE trt2 / DISPLAY DRUG B"; DEFINE trt3 / DISPLAY "TOTAL";

    BREAK AFTER order / SKIP;RUN;QUIT;

    12345

  • *The BY statement PROC REPORT ; BY variable-n COLUMN column-list;DEFINE item / ;BREAK BEFORE|AFTER break-variable /;RBREAK BEFORE|AFTER ; RUN; PROC REPORT expects the data set to be sorted in order of the BY variables.

    NOTE: The BY statement can not be used in the windowing environment.

  • *Exercise 3.

    3. Include a break after each visit.

    3.A. Create a break before each subject and a break after each page.

  • *The COMPUTE statement PROC REPORT ; COLUMN column-list;DEFINE item / ;BREAK BEFORE|AFTER break-variable /;

    COMPUTE BEFORE|AFTER ; LINE specification(s);ENDCOMP;COMPUTE report-item ; CALL DEFINE (column-id, attribute-name,value);ENDCOMP;

    RUN; A compute block contains one or more programming statements that PROC REPORT executes as it builds the report.An ENDCOMP statement must mark the end of the group of statements in the compute block.

  • *The COMPUTE statement locationThe location determines where the compute block executes.

    location

    AFTER- executes the compute block immediately after the last row of each set of rows that have the same value for the break-variable.

    BEFORE - executes the compute block immediately before the last row of each set of rows that have the same value for the break-variable.

  • *The COMPUTE statement report-itemreport-item

    This specifies a data set variable, a computed variable or statistic to associate the block with.

    The report-item must be included in the COLUMN statement.

    Also if the report-item is a computed variable this must be included in the DEFINE statement too.

  • *Using a COMPUTE BLOCK Example 9TITLE3 "Using the COMPUTE AFTER block statement to add a footer. A PAGE variable is needed to control this";PROC REPORT DATA=table_tr NOWD MISSING HEADLINE HEADSKIP; BY page; COLUMN page order reasonn ("--" discreas ("- TREATMENT GROUP -" trt1 trt2) trt3); DEFINE page / ORDER NOPRINT; DEFINE order / ORDER NOPRINT; DEFINE reasonn / ORDER NOPRINT; DEFINE discreas / DISPLAY "REASON FOR DISCONTINUATION"; DEFINE trt1 / DISPLAY DRUG A"; DEFINE trt2 / DISPLAY DRUG B"; DEFINE trt3 / DISPLAY "TOTAL";

    BREAK AFTER order / SKIP;

    COMPUTE AFTER page; uline = REPEAT("-",132); foot = "O:\TRAINING\SAS\PROC REPORT\Using the COMPUTE block.sas";

    LINE @1 uline $132.; LINE @1 " "; LINE @1 132*'_'; LINE @1 " "; LINE @1 foot $132.; ENDCOMP;RUN;QUIT;

  • *Using a COMPUTE BLOCK Example 9 cont. Using DEFINE statements Using the COMPUTE AFTER block statement to add a footer. A PAGE variable is needed to control this

    TREATMENT GROUP REASON FOR DISCONTINUATION DRUG A DRUG B TOTAL

    Number of subjects xx (xx.x%) xx (xx.x%) xx (xx.x%)

    Number of subjects who completed the entire trial xx (xx.x%) xx (xx.x%) xx (xx.x%)

    Primary reasons for premature discontinuation

    Did not meet screening assessments xx (xx.x%) xx (xx.x%) xx (xx.x%) Withdrawn by investigator xx (xx.x%) xx (xx.x%) xx (xx.x%) Withdrew consent xx (xx.x%) xx (xx.x%) xx (xx.x%) Adverse Events xx (xx.x%) xx (xx.x%) xx (xx.x%) Lack of therapeutic response xx (xx.x%) xx (xx.x%) xx (xx.x%) Lost to follow-up xx (xx.x%) xx (xx.x%) xx (xx.x%) Death xx (xx.x%) xx (xx.x%) xx (xx.x%) Medication non-compliance xx (xx.x%) xx (xx.x%) xx (xx.x%) Clinically significant test results xx (xx.x%) xx (xx.x%) xx (xx.x%) Other xx (xx.x%) xx (xx.x%) xx (xx.x%)

    Total number of withdrawals: xx (xx.x%) xx (xx.x%) xx (xx.x%)

    ------------------------------------------------------------------------------------------------------------------------------------

    ____________________________________________________________________________________________________________________________________

    O:\TRAINING\SAS\PROC REPORT\Using the COMPUTE block.sas

  • *Using a COMPUTE BLOCK Example 10PROC REPORT DATA=final SPLIT='~' SPACING=3 NOWD MISSING; COLUMN page ('__~ ' charact order statnum statist DRUG_A DRUG_Boverall comp_total); DEFINE page / ORDER NOPRINT; DEFINE order / ORDER NOPRINT; DEFINE charact / ORDER order=internal WIDTH=30 LEFT f=charac. 'Characteristic '; DEFINE statnum / ORDER order=internal NOPRINT; DEFINE statist / DISPLAY WIDTH=20 LEFT 'Statistic'; DEFINE DRUG_A / DISPLAY WIDTH=20 LEFT f=$20. DRUG A'; DEFINE DRUG_B / DISPLAY WIDTH=20 LEFT f=$20. DRUG B'; DEFINE overall / DISPLAY WIDTH=10 LEFT f=$10. 'Overall'; DEFINE comp_total /COMPUTED WIDTH=10 LEFT 'Computed Overall';

    BREAK BEFORE charact / SKIP; BREAK AFTER page / PAGE;

    COMPUTE BEFORE page; LINE @1 132*'_'; ENDCOMP;

    COMPUTE comp_total; if order in( 1 2 5 7) then comp_total= input(DRUG_A,8.) + input(DRUG_B,8.); ENDCOMP;

    COMPUTE AFTER page; LINE @1 132*'_'; %produced(pagevar=page,totvar=&totpage,version=1); LINE @1 'Source: Listing 5.'; LINE @1 ' '; LINE @1 'Note: Percentages are based on the number of patients in the All Randomized Set with non-missing values for each characteristic,'; LINE @1 ' in each treatment group.'; LINE @1 ' Summary statistics are based on gender, race and date of birth recorded at Screening Visit 1.'; LINE @1 ' Age is calculated at randomization date.'; ENDCOMP;RUN;

  • *Using a COMPUTE BLOCK Example 10 cont. Example of a COMPUTE block____________________________________________________________________________________________________________________________________

    Computed Characteristic Statistic DRUG A DRUG B Overall Overall____________________________________________________________________________________________________________________________________

    Total number of patients N 21 9 30 30

    Gender N 21 9 30 30 Male 10 (48%) 2 (22%) 12 (40% Female 11 (52%) 7 (78%) 18 (60%

    Age (years) N 21 9 30 Mean 10.4 9.9 10.2 SD 5.1 4.0 4.8 Median 8.0 9.0 8.5 Minimum 2 6 2 Maximum 19 20 20

    Age group (years) N 21 9 30 30 2 - 11 11 (52%) 8 (89%) 19 (63% 12 - 17 7 (33%) 0 7 (23% >= 18 3 (14%) 1 (11%) 4 (13%

    Race N 21 9 30 30 White 11 (52%) 4 (44%) 15 (50% Black 2 (10%) 2 (22%) 4 (13% Asian (Oriental) 1 (5%) 0 1 (3% Asian (Other) 2 (10%) 2 (22%) 4 (13% Hispanic 4 (19%) 1 (11%) 5 (17% Other 1 (5%) 0 1 (3%____________________________________________________________________________________________________________________________________Produced: September 29, 2006, version 1. Page 1 of 1Source: Listing 5.

    Note: Percentages are based on the number of patients in the All Randomized Set with non-missing values for each characteristic, in each treatment group. Summary statistics are based on gender, race and date of birth recorded at Screening Visit 1. Age is calculated at randomization date.

  • *Exercise 4.4. Create a line before and after each page.

    4.B. Include a headskip and a line at the very top of each page.