You are on page 1of 73

ODS 101: Essential Concepts of the SAS® Output Delivery System

Presented By:

Andrew H. Karp
Sierra Information Services, Inc.
19229 Sonoma Highway #264 Sonoma, California 95476 USA 707 996 7380 SierraInfo @ AOL.COM http://www.SierraInformation.com

Copyright © 2003 Sierra Information Services, Inc. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any other means, electronic, mechanical, photocopying, or otherwise, without the prior written permission of the publisher, Sierra Information Inc. SAS is a trademark of SAS Institute in the USA and other countries. ® indicates USA registration. Revised 01 Mar 03

1

Agenda/Topics
How does the ODS “work”? Understanding and working with
Objects/Tables Destinations

Destinations
OUTPUT Destination: working with SAS data sets created by ODS CSV, RTF, HTML and PDF Destinations Modifying the appearance of your output
2

Copyright © 2003 Sierra Information Services, Inc. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any other means, electronic, mechanical, photocopying, or otherwise, without the prior written permission of the publisher, Sierra Information Inc. SAS is a trademark of SAS Institute in the USA and other countries. ® indicates USA registration. Revised 10 Jan 2003

1

The Output Delivery System
New to Version 8 of the SAS System
Was added to the SAS System in V7, but this Version was not around for very long

Set of tools to control the delivery of SAS-generated output Prior to Version 8 all Procedure-generated output was rendered as text and placed in the Output Window
Very little user control over content or display Often difficult to capture Procedure-generated output as SAS data sets Prior to Version 8, the Procedure generated the output

3

The Output Delivery System
Now, in Version 8:
Most procedures generate output and sends it to the Output Delivery System SAS PROCs that can generate output to the Output Window are said to “support the Output Delivery System.” This means
Their output is rendered as “output objects” Output objects are rendered as a function of their
Data component (the output generated by the PROC) Table component (rules for rendering data component)

Output objects are sent by SAS to ODS destinations The destination determines how the output will be rendered

4

Copyright © 2003 Sierra Information Services, Inc. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any other means, electronic, mechanical, photocopying, or otherwise, without the prior written permission of the publisher, Sierra Information Inc. SAS is a trademark of SAS Institute in the USA and other countries. ® indicates USA registration. Revised 10 Jan 2003

2

The Output Delivery System
More on ODS Destinations
The default destination is LISTING
If you do nothing, all output is sent to the Output Window, just like in previous releases of SAS System software.

ODS Statements control
Which destinations are open/closed What will be output to the destination How the output will be portrayed/rendered

SAS continues to add new destinations to ODS
PDF (new in Release 8.1) XML (experimental in Release 8.2, is production in Version 9) CSV (experimental in Release 8.2, is production in Version 9)
5

The Output Delivery System
Some core suggestions for using ODS
If you set ODS LISTING CLOSE, don’t forget to set ODS LISTING ON later on in your program
Remember to close all ODS destinations as soon as you are done sending output to them.

Be prepared to experiment and explore with ODS
It is a very powerful and complex part of the SAS System that takes some practice getting used to using

Don’t spend lots of time making RTF, HTML or other types of ODSgenerated output until you are sure that your report/table/output is what you want it to look like Using the NOPRINT Option in a SAS Procedure disables the PROC’s ability to send tables to the Output Delivery System
6

Copyright © 2003 Sierra Information Services, Inc. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any other means, electronic, mechanical, photocopying, or otherwise, without the prior written permission of the publisher, Sierra Information Inc. SAS is a trademark of SAS Institute in the USA and other countries. ® indicates USA registration. Revised 10 Jan 2003

3

SAS is a trademark of SAS Institute in the USA and other countries.The Output Delivery System An overview of how ODS works Procedure generates Data Component and sends to ODS Data Component and Table Definitions are bound by the ODS to form an Output Object Output objects are sent by the ODS to the specified Destinations 7 How Does the Output Delivery System Work? ODS-compliant SAS® Procedure Data Set Data Component Analyses. stored in a retrieval system. ® indicates USA registration. page 22 Output Delivery System Output Object 8 Copyright © 2003 Sierra Information Services. or transmitted. without the prior written permission of the publisher. Inc. Revised 10 Jan 2003 4 . etc. in any form or by any other means. photocopying. mechanical. No part of this publication may be reproduced. or otherwise. Sierra Information Inc. electronic. Adapted from “The Complete Guide to the SAS Output Delivery System” (SAS Institute. tables. 2001).

Sierra Information Inc. electronic. page 22 Understanding Tables. Inc. in any form or by any other means. or transmitted. ® indicates USA registration. which are then sent to Destinations Output Object ODS Destinations LISTING PDF RTF HTML CSV OUTPUT 9 Adapted from “The Complete Guide to the SAS Output Delivery System” (SAS Institute. or otherwise. stored in a retrieval system. title1 'ODS for Data Analysts & Statisticians'. photocopying. title2 'Objects and Destinations'. Revised 10 Jan 2003 5 .regressdata. SAS is a trademark of SAS Institute in the USA and other countries.How Does the Output Delivery System Work? Output Delivery System ODS binds the Table Definition to the Data Component and creates the Output Object(s). 10 Copyright © 2003 Sierra Information Services. Proc Reg Data=SUGI28. No part of this publication may be reproduced. quit. mechanical. * example 1: output objects. without the prior written permission of the publisher. 2001). Model Depvar = Y1. title3 'Default PROC REG Output: Simple Regression Model'. Objects and Destinations OPTIONS nonumber nodate nocenter.

Revised 10 Jan 2003 6 . in any form or by any other means. or transmitted.Understanding Tables. electronic. Objects and Destinations Listing Destination (Output Window). 12 Copyright © 2003 Sierra Information Services. without the prior written permission of the publisher. Inc. mechanical. photocopying. No part of this publication may be reproduced. 11 Understanding Tables. stored in a retrieval system. By default. Objects and Destinations RESULTS Window. What we’re used to seeing. ® indicates USA registration. Sierra Information Inc. SAS is a trademark of SAS Institute in the USA and other countries. or otherwise. ODS has sent the output objects generated from the PROC REG output to the default LISTING (Output Window) Destination.

or transmitted. Sierra Information Inc. photocopying. by the ODS to the LISTING Destination (i. Model Depvar= Y1/r. Revised 10 Jan 2003 7 . Objects and Destinations The PROCLABEL Statement allows you to specify a Label for your procedure-generated output. ® indicates USA registration.regressdata. without the prior written permission of the publisher. ods proclabel = 'Ex 2: Residual Analysis'. No part of this publication may be reproduced. quit. *<==adding the R Option. electronic. These tables are sent. in any form or by any other means..e. which facilitates identification of specific results/analyses in the Results Window. title3 'Residual Analysis'. or otherwise. The label appears in the Results Window.Understanding Tables. Objects and Destinations Adding the “r” option to the MODEL Statement in PROC REG generated two new tables containing additional analyses. Inc. stored in a retrieval system. proc reg data=sugi28. along with the default tables. * example 2: Residual Analysis. 13 Understanding Tables. the Output Window) 14 Copyright © 2003 Sierra Information Services. SAS is a trademark of SAS Institute in the USA and other countries. mechanical.

or otherwise. 16 Copyright © 2003 Sierra Information Services. Terminates writing of table names to the SASLOG ODS TRACE ON/LISTING.regressdata. in any form or by any other means. ODS TRACE OFF. ods proclabel = 'Ex 3: ODS TRACE ON/OFF'. Inc. or transmitted. Revised 10 Jan 2003 8 . photocopying. mechanical. without the prior written permission of the publisher. quit. stored in a retrieval system. SAS is a trademark of SAS Institute in the USA and other countries. Sierra Information Inc. Writes table names and associated information to the LISTING Destination. Objects and Destinations Learning the Names of ODS Tables ODS TRACE ON. No part of this publication may be reproduced. ® indicates USA registration. proc reg data=sugi28. just before the output table itself Procedure Documentation All ODS-compliant Procedures have a list of tables in their documentation 15 Learning the Names of ODS Tables ODS TRACE ON. model depvar = y1/r.Understanding Tables. title3 'Residual Analysis with ODS TRACE ON/OFF'. electronic. Writes table names and associated information to the SASLOG ODS TRACE OFF.

® indicates USA registration. 17 Learning the Names of ODS Tables 18 Copyright © 2003 Sierra Information Services. Inc. Revised 10 Jan 2003 9 . stored in a retrieval system. or otherwise.Learning the Names of ODS Tables SASLOG after ODS TRACE ON is executed. where it can be reviewed. Information about tables generated is written to the SASLOG. No part of this publication may be reproduced. or transmitted. in any form or by any other means. Sierra Information Inc. without the prior written permission of the publisher. mechanical. electronic. photocopying. SAS is a trademark of SAS Institute in the USA and other countries.

proc reg data=sugi28. table information is placed in the Output Window. model depvar = y1/r. or otherwise. mechanical. electronic. Revised 10 Jan 2003 10 . quit. ODS TRACE OFF. title3 'ODS TRACE ON/LISTING'.regressdata. 19 Learning the Names of ODS Tables When the LISTING Option is specified with the ODS TRACE ON statement. stored in a retrieval system. without the prior written permission of the publisher. photocopying. No part of this publication may be reproduced. Inc. SAS is a trademark of SAS Institute in the USA and other countries. or transmitted.Learning the Names of ODS Tables * example 4: ODS TRACE ON/LISTING. in any form or by any other means. Sierra Information Inc. ods proclabel = 'Ex 4: ODS TRACE ON/LISTING'. ODS TRACE ON/LISTING. Some SAS users find this an easier way to identify which table is associated with what part of the Procedure-generated output than to have the table information written to the SASLOG. 20 Copyright © 2003 Sierra Information Services. rather than in the SASLOG. ods trace off. ® indicates USA registration.

photocopying. without the prior written permission of the publisher. 22 Copyright © 2003 Sierra Information Services. electronic. ® indicates USA registration. No part of this publication may be reproduced. SAS is a trademark of SAS Institute in the USA and other countries. mechanical. Here is an example from on-line documentation for PROC REG.Learning the Names of ODS Tables 21 Learning the Names of ODS Tables All ODS-compliant SAS Procedures have a listing of table names in their respective chapters in both hardcopy and on-line SAS documentation. in any form or by any other means. Revised 10 Jan 2003 11 . Inc. stored in a retrieval system. or transmitted. or otherwise. Sierra Information Inc.

or otherwise. electronic. SAS is a trademark of SAS Institute in the USA and other countries. stored in a retrieval system. mechanical. ® indicates USA registration. in any form or by any other means.Learning the Names of ODS Tables A (small) excerpt from the ODS Table Names segment of PROC REG documentation. Inc. without the prior written permission of the publisher. No part of this publication may be reproduced. Output Objects are Sent by the ODS to Destinations The Default Destination is LISTING The Output Window How to Learn the Names of the Objects Created by the ODS. photocopying. or transmitted. 23 Working With Tables What Have We Learned So Far? ODS Receives Data Component(s) from a SAS Procedure and Renders it/them as Output Objects ODS binds the Table Definition to the Data Component. ODS TRACE ON/OFF Procedure Documentation 24 Copyright © 2003 Sierra Information Services. resulting in an Output Object. Sierra Information Inc. Revised 10 Jan 2003 12 .

quit. or otherwise. electronic. ods select fitstatistics. model depvar = y2. title3 'ODS Select Statement'.Working with Tables Now that we’ve mastered the basics… Selecting which Objects will be created Understanding “persistence” Creating SAS Data Sets using the OUTPUT Destination Working with ODS-generated SAS data sets 25 Selecting Tables * example 5: Selection Lists/Persistence. photocopying. No part of this publication may be reproduced. title3 'ODS SELECT Statement'. title4 'Persistence of Selection Lists'. ® indicates USA registration. in any form or by any other means. stored in a retrieval system.regressdata. Sierra Information Inc. proc reg data=sugi28. model depvar=y1. without the prior written permission of the publisher. proc reg data=sugi28. ods proclabel = 'Ex 5B: Default Re-Set of Selection List'. Inc.regressdata. mechanical. 26 Copyright © 2003 Sierra Information Services. Revised 10 Jan 2003 13 . or transmitted. ods proclabel = 'Ex 5A: Selection Lists / Persistence'. quit. SAS is a trademark of SAS Institute in the USA and other countries.

electronic. selection lists are re-set to ALL at the end of all (explicit or implicit) step boundaries. title3 'ODS SELECT Statement'. 28 Copyright © 2003 Sierra Information Services.regressdata. ods proclabel = 'Ex 5A: Selection Lists/Persistence'. title3 'ODS Select Statement'. photocopying. proc reg data=sugi28. Inc. without the prior written permission of the publisher.Selecting Tables By default. title4 'Persistence of Selection Lists'. proc reg data=sugi28. quit. ® indicates USA registration. ODS Selection List Re-Set to ALL At Step Boundary ods proclabel = 'Ex 5B: Default Re-Set of Selection List'.regressdata. SAS is a trademark of SAS Institute in the USA and other countries. Sierra Information Inc. ods select fitstatistics. mechanical. model depvar = y2. model depvar=y1. or transmitted. or otherwise. 27 Selecting Tables * example 5: Selection Lists/Persistence. in any form or by any other means. No part of this publication may be reproduced. quit. stored in a retrieval system. Revised 10 Jan 2003 14 .

or otherwise. photocopying. SAS is a trademark of SAS Institute in the USA and other countries. or transmitted. You need to give SAS the: Name of the table See the Procedure documentation or Use ODS TRACE ON/TRACE OFF Name of the data set to be created form the table Both temporary and permanent SAS data sets can be created by ODS SAS Data Set Options can be used in the OUTPUT Destination statement to “shape” the data set. mechanical. No part of this publication may be reproduced. stored in a retrieval system. Sierra Information Inc.Creating SAS Data Sets from Procedure-Generated Output The OUTPUT destination creates SAS data sets from Procedure-generated output You can now convert your Procedure output to SAS data sets. 29 Creating SAS Data Sets from ODS Objects Objects sent to the OUTPUT Destination will be rendered as SAS data sets Temporary SAS data sets (in the WORK library) Permanent SAS data sets (where a LIBREF has already been assigned/established) Objects sent to the OUTPUT Destination are “for real” SAS data sets. without the prior written permission of the publisher. ® indicates USA registration. electronic. Inc. in any form or by any other means. Revised 10 Jan 2003 15 . They contain Descriptor Portion Data Portion (variables and observations/columns and rows) Can be used/manipulated just like any other SAS data set created using other methods Data Step Procedure Step 30 Copyright © 2003 Sierra Information Services.

proc contents data=sugi28. proc print data=sugi28. 31 Creating SAS Data Sets from ODS Objects In this example. stored in a retrieval system. * contents of FITSTATISTICS Object Saved as Permanent SAS Data Set'. title3 'ODS Output Statement'. title4 'Creating SAS Data Sets from PROC Output'.regressdata. Inc.fit1. or otherwise.Creating SAS Data Sets from ODS Objects * example 6: Output Destination. Since the LISTING Destination is always open by default. proc reg data=sugi28.fit1. running the Procedure steps on the previous page resulted in having the ODS sent output to two Destinations: Listing (for all objects) and Output (for the Fitstatistics Object) 32 Copyright © 2003 Sierra Information Services. mechanical. Sierra Information Inc. photocopying. electronic. model depvar = y2.fit1. a permanent SAS data set was created from the FITSTATISTICS Object and stored in the folder with SUGI28 as its LIBREF. title3 'SAS Data Set Created from FITSTATISICS Object'. Revised 10 Jan 2003 16 .Fit1'. run. or transmitted. quit. SAS is a trademark of SAS Institute in the USA and other countries. run. title3 'Descriptor Portion Info for Data Set SUGI28. ® indicates USA registration. without the prior written permission of the publisher. No part of this publication may be reproduced. ods proclabel = 'EX6: Creating SAS Data Set from Output'. in any form or by any other means. ods output fitstatistics = sugi28.

Creating SAS Data Sets from ODS Objects SAS VIEWTABLE for data set SUGI28. electronic.38640 49.936147 R-Square 0. Sierra Information Inc.253003 cValue1 1038. Inc. No part of this publication may be reproduced.93615 2109.FIT1 34 Copyright © 2003 Sierra Information Services.25300 nValue2 0.FIT1. created by the ODS when the PROC REG-generated data component was rendered as a SAS data set using the OUTPUT Destination. SAS is a trademark of SAS Institute in the USA and other countries. stored in a retrieval system. ® indicates USA registration. mechanical. in any form or by any other means. or transmitted.7091 3 49.715042 0.7150 2 2109. or otherwise.386400 Adj R-Sq 0.709105 PROC PRINT Output showing observations and variables in SUGI28. Revised 10 Jan 2003 17 . without the prior written permission of the publisher. photocopying. 33 Creating SAS Data Sets from ODS Objects The SAS System SAS Data Set Created from FITSTATISICS Object Obs Model Dependent Label1 1 MODEL1 DEPVAR Root MSE 2 MODEL1 DEPVAR Dependent Mean 3 MODEL1 DEPVAR Coeff Var c Obs nValue1 Label2 Value2 1 1038.

Fit1 The CONTENTS Procedure Data Set Name SUGI28. Inc. 36 Copyright © 2003 Sierra Information Services. Revised 10 Jan 2003 18 . in any form or by any other means. ® indicates USA registration. or Submit the ODS LISTING statement. without the prior written permission of the publisher.3 35 Closing the LISTING Destination You can stop the ODS from sending output objects to the LISTING Destination (the Output Window. or transmitted.FIT1 D12.3 D12. 2003 Protection Data Set Type Label Data Representation Encoding Fit Statistics WINDOWS wlatin1 Western (Windows) Compressed Sorted Observations Variables Indexes Observation Length Deleted Observations NO NO 3 8 0 120 0 [Engine/Host Dependent Information Deleted] Alphabetic List of Variables and # Variable Type Len 2 Dependent Char 32 3 Label1 Char 14 6 Label2 Char 8 1 Model Char 32 4 cValue1 Char 11 7 cValue2 Char 7 5 nValue1 Num 8 8 nValue2 Num 8 Attributes Format PROC CONTENTS output for SAS data set SUGI28. 2003 Last Modified 14:44 Monday. photocopying. March 3. and subsequently re-start SAS. mechanical. electronic.Creating SAS Data Sets from ODS Objects Descriptor Portion Info for Data Set SUGI28. or otherwise. SAS is a trademark of SAS Institute in the USA and other countries. This is particularly useful if you want your output tables sent to other destinations. WARNING: The LISTING destination remains CLOSED until YOU… terminate your SAS Session. Sierra Information Inc. March 3.FIT1 Member Type DATA Engine V9 Created 14:44 Monday. but have no need for results to be placed in the Output Window. stored in a retrieval system. No part of this publication may be reproduced.

otherwise you’ll probably have more output than you know what to do with. stored in a retrieval system. in any form or by any other means. Revised 10 Jan 2003 19 . proc reg data=sugi28. * <== DONT FORGET!!. ods output parameterestimates = sugi28.regressdata. without the prior written permission of the publisher. or otherwise. Inc. Sierra Information Inc. or transmitted.est1. quit. ods proclabel = 'Ex 7: Closing the LISTING Destination'. photocopying. After the explicit Step Boundary terminating the PROC REG task. model depvar = y1. all destinations remain open until you close them Hint Don’t keep destinations open longer than you have to. the LISTING Destination is CLOSED while the OUTPUT Destinations are open ONLY for the FITSTATISTICS and PARAMETERESTIMATES Objects. mechanical. 38 Copyright © 2003 Sierra Information Services. ods listing close.fit2. No part of this publication may be reproduced. ods output fitstatistics = sugi28. ods listing. electronic. In this example.Opening/Closing ODS Destinations By default: The LISTING destination is OPEN unless you close it All other destinations are CLOSED until you open them Once open. the LISTING destination is re-set to ON so that output from subsequent SAS procedure steps will be displayed in the Output Window. 37 Closing the LISTING Destination * example 7: Closing LISTING Destination. ® indicates USA registration. SAS is a trademark of SAS Institute in the USA and other countries.

Sierra Information Inc. the Results Window shows that we have two SAS data sets. Revised 10 Jan 2003 20 . or otherwise. ® indicates USA registration. 39 Using ODS to Create Output Reports We will now look at the CSV PDF HTML RTF Comma Separated Values Portable Document File Hypertext Markup Language Rich Text Format ODS Destinations We will also see the use of SAS-supplied Templates ODS Style Definitions with PROCs PRINT and REPORT 40 Copyright © 2003 Sierra Information Services. in any form or by any other means. and no other output. and the OUTPUT Destinations were opened only for the FITSTATISTICS and PARAMETERESTIMATES Objects. without the prior written permission of the publisher. Inc. SAS is a trademark of SAS Institute in the USA and other countries. stored in a retrieval system. or transmitted. photocopying. generated from the PROC REG task in Example 7. mechanical.Closing the LISTING Destination Since the LISTING Destination was CLOSED. electronic. No part of this publication may be reproduced.

42 Copyright © 2003 Sierra Information Services. mechanical. model depvar = &best. electronic. Revised 10 Jan 2003 21 . or transmitted. quit. ods CSV file = "&path\parameters. title2 'Optimal Subset Selection with ODS'. No part of this publication may be reproduced. photocopying. without the prior written permission of the publisher. ods select parameterestimates. proc reg data=sugi28.regressdata. options symbolgen. ods csv close.The CSV Destination Experimental in Release 8.csv". ods listing close. ® indicates USA registration. ods listing. and can be read by most spreadsheet products 41 The CSV Destination %let path = C:\Documents and Settings\Administrator \Desktop\SUGI28. * ex 17: CSV Destination. or otherwise. SAS is a trademark of SAS Institute in the USA and other countries. Inc. stored in a retrieval system.2 Production in Version 9 Renders output as a Comma Separated Values (CSV) File A text file with commas that separate the values of the variables Useful if you want to convert the output to a spreadsheet file CSV is a text format. Sierra Information Inc. in any form or by any other means.

csv". SYMBOLGEN: Macro variable BEST resolves to Y2 Y3 Y4 Y6 Y7 75 title2 'Optimal Subset Selection with ODS'. SAS is a trademark of SAS Institute in the USA and other countries.csv 73 proc reg data=sugi28. photocopying. electronic.The CSV Destination 67 %let path = C:\Documents and Settings\Administrator\Desktop\SUGI28.19 seconds cpu time 0. SYMBOLGEN: Macro variable PATH resolves to C:\Documents and Settings\Administrator\Desktop\SUGI28 NOTE: Writing CSV Body file: C:\Documents and Settings\Administrator\Desktop\SUGI28\parameters. or transmitted. No part of this publication may be reproduced.regressdata. in any form or by any other means. Inc. ® indicates USA registration. stored in a retrieval system.07 seconds 77 78 ods csv close. NOTE: 50 observations used in computations. 70 ods listing close. 76 quit. 71 ods select parameterestimates. or otherwise. Sierra Information Inc. 43 The CSV Destination 44 Copyright © 2003 Sierra Information Services. Revised 10 Jan 2003 22 . 72 ods CSV file = "&path\parameters. 69 options symbolgen. mechanical. ods listing. NOTE: 50 observations read. 68 * ex 17: CSV Destination. without the prior written permission of the publisher. 74 model depvar = &best. NOTE: PROCEDURE REG used (Total process time): real time 0.

Revised 10 Jan 2003 23 .The CSV Destination 45 The CSVALL Destination New to SAS Version 9. or transmitted. stored in a retrieval system. mechanical. SAS is a trademark of SAS Institute in the USA and other countries. No part of this publication may be reproduced. Sierra Information Inc. ® indicates USA registration. without the prior written permission of the publisher. electronic. or otherwise. in any form or by any other means. the CSVALL Destination: Creates a Comma Separated Values file from your SAS output File includes Titles Footnotes By-lines 46 Copyright © 2003 Sierra Information Services. photocopying. Inc.

SAS is a trademark of SAS Institute in the USA and other countries. title1 'ODS for Data Analysts and Statisticians'. in any form or by any other means. Sierra Information Inc. electronic. footnote1 'SUGI 28 Sunday Seminar'. proc reg data=sugi28. %let path = C:\Documents and Settings\Administrator\Desktop\SUGI28. ods csvall file="&path\csvall_example. mechanical. ods select parameterestimates. ods listing. ods csvall close. stored in a retrieval system. without the prior written permission of the publisher.regressdata. photocopying. ® indicates USA registration.The CSVALL Destination * EX 20: CSVALL DESTINATION. Inc. or transmitted. or otherwise.csv". model depvar=y1-y7. quit. No part of this publication may be reproduced. ods listing close. 47 The CSVALL Destination 48 Copyright © 2003 Sierra Information Services. footnote2 'Using the New CSVALL Destination'. Revised 10 Jan 2003 24 . title2 'Multiple Regression Analysis'.

ods listing. SAS is a trademark of SAS Institute in the USA and other countries. electronic. Revised 10 Jan 2003 25 .The RTF Destination The Rich Text Format (RTF) destination creates files that are easily imported in to Microsoft Office™ products such as Microsoft Word™ Microsoft Powerpoint™ The RTF destination is pretty simple and straightforward. run. Here is an example. stored in a retrieval system. proc print data=bestsubset. ods listing close. %let path = C:\Documents and Settings\Administrator\Desktop\SUGI28. title2 'Optimal Subset Selection with ODS'. mechanical. title3 'RTF Destination: Default Style'. in any form or by any other means. Inc. options symbolgen date number. Sierra Information Inc. or otherwise. 50 Copyright © 2003 Sierra Information Services. 49 The RTF Destination * ex 18A: rtf destination. title1 'ODS for Data Analysts and Statisticians'. No part of this publication may be reproduced. without the prior written permission of the publisher. ® indicates USA registration. ods rtf close. photocopying. or transmitted.rtf" bodytitle. ods rtf file = "&path\reg1.

The RTF Destination
The screen capture on the previous page shows the results of specifying the RTF destination
By default, the RTF destination puts the TITLES and FOOTNOTES (if any) in the headers and footers of the RTF document
The BODYTITLE option is used with the RTF destination to override this default

51

From SAS Technical Support…

An important note from the SAS Tech Support Web Site regarding problems using the BODYTITLE option with the RTF destination. It will only work if the DATE and NUMBER System Options are in effect.

52

Copyright © 2003 Sierra Information Services, Inc. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any other means, electronic, mechanical, photocopying, or otherwise, without the prior written permission of the publisher, Sierra Information Inc. SAS is a trademark of SAS Institute in the USA and other countries. ® indicates USA registration. Revised 10 Jan 2003

26

The RTF Destination

53

The RTF Destination
Some comments
In this example the default commands for setting colors, font sizes, shading, etc were used. In subsequent examples we will see how to control the presentation of the output.
STYLE Definitions in PROC REPORT PROC TEMPLATE

54

Copyright © 2003 Sierra Information Services, Inc. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any other means, electronic, mechanical, photocopying, or otherwise, without the prior written permission of the publisher, Sierra Information Inc. SAS is a trademark of SAS Institute in the USA and other countries. ® indicates USA registration. Revised 10 Jan 2003

27

Specifying a STYLE
Here is an example of specifying a STYLE when generating an RTF file
options date number; ods listing close; ods rtf file = 'bestsubsets2.rtf' BODYTITLE style=d3d; proc print data=sbc label obs='Model'; title1 'SAS ODS for Data Analysts and Statisticians'; title2 'Working with Output Data Sets'; title3 'Optimal Subset Selection: Logistic Regression Model'; title4 'Using the D3D Style'; run; ods rtf close; ods listing;

55

Specifying a STYLE

56

Copyright © 2003 Sierra Information Services, Inc. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any other means, electronic, mechanical, photocopying, or otherwise, without the prior written permission of the publisher, Sierra Information Inc. SAS is a trademark of SAS Institute in the USA and other countries. ® indicates USA registration. Revised 10 Jan 2003

28

® indicates USA registration. without the prior written permission of the publisher. Revised 10 Jan 2003 29 . electronic. Inc. mechanical. or otherwise. in any form or by any other means. photocopying. SAS is a trademark of SAS Institute in the USA and other countries.Specifying a STYLE 57 Specifying a STYLE Science Style is new to SAS Version 9 58 Copyright © 2003 Sierra Information Services. or transmitted. No part of this publication may be reproduced. Sierra Information Inc. stored in a retrieval system.

mechanical. photocopying. ® indicates USA registration. list styles. stored in a retrieval system. 59 The PDF Destination Added in Release 8. Inc. No part of this publication may be reproduced. Revised 10 Jan 2003 30 . proc template. 60 Copyright © 2003 Sierra Information Services. title2 'SAS-Supplied STYLES in Version 9'. or otherwise.Understanding Styles options nonumber nodate nocenter. without the prior written permission of the publisher. electronic. Sierra Information Inc. run. SAS is a trademark of SAS Institute in the USA and other countries. in any form or by any other means.2 of the SAS System The PDF destination creates a Portable Document File Easy to send SAS output to someone who uses the Acrobat Reader™ to look at PDF files Report recipient does not need SAS Software to read the report/analysis when SAS output is rendered as a PDF document using the PDF Destination. title1 'ODS for Data Analysts and Statisticians'. or transmitted.

The PDF Destination Example: create a Portable Document File with several analyses from a marketing response/predictive modeling project All the analyses will be placed in one PDF file. Ods proclabel 'Frequency Distributions'. proc freq data=sasclass. A table of contents is automatically generated for the PDF file If you don’t want one. value sdbfmt 1 = 'Yes' 0 = 'No'. 62 Copyright © 2003 Sierra Information Services. title2 'Using the PDF Destination'. Revised 10 Jan 2003 31 . photocopying. ods listing close.pdf" style=default. stored in a retrieval system.training. No part of this publication may be reproduced. Sierra Information Inc. ODS PDF NOTOC file = “filename”. tables respond*(branch res sdb). ods listing close. run.. options nonumber nodate nocenter ls=80. or transmitted. electronic. or otherwise. title4 'Response by Customer Branch and Residence Code'. value resfmt 1 = 'Responder' 0 = 'Non Responder'. ods pdf file = "&path\best_sub_default. %let path= C:\Documents and Settings\Administrator\My Documents\Files from Destop #1\SAS Class Materials\Reporting Class Materials and Data Sets . format respond resfmt. That’s because the PDF destination remains OPEN until it is CLOSED. title3 'Marketing Campaign Response Analysis'. title1 'SAS ODS for Data Analysts and Statisticians'. 61 The PDF Destination * create a PDF file. Inc. SAS is a trademark of SAS Institute in the USA and other countries. include the NOTOC option in the ODS PDF Destination statement. without the prior written permission of the publisher. run. proc format. ® indicates USA registration. in any form or by any other means. mechanical.

class respond.training DESC. ods select parameterestimates. run. DDA Balance. ods select modelbuildingsummary. Inc. Sierra Information Inc.training. photocopying. electronic. proc means maxdec=0 mean n nmiss range median data=sasclass. var income teller ddabal ccbal checks phone ATM.The PDF Destination ods proclabel 'Analysis of Continuous Level Variables'. ® indicates USA registration. in any form or by any other means. proc logistic data=sasclass. ods pdf close. SAS is a trademark of SAS Institute in the USA and other countries. 63 The PDF Destination 64 Copyright © 2003 Sierra Information Services. or transmitted. ods listing. title6 'Phone Banking and ATM Usage'. proc logistic data=sasclass. mechanical. title5 'Income. title4 'All Independent Variables'. No part of this publication may be reproduced. ods proclabel 'Predictive Model #2: Stepwise Selection'. stored in a retrieval system. Credit Card Balance'. model respond=ACCTAGE ATM CCBAL CHECKS DDABAL DEP DIRDEP MOVED PHONE SDB TELLER. title4 'Analyzing Response/Non-Response By'. or otherwise.training desc. run. run. Teller. without the prior written permission of the publisher. model respond=ACCTAGE ATM CCBAL CHECKS DDABAL DEP DIRDEP MOVED PHONE SDB TELLER/selection=stepwise. ods proclabel 'Predictive Model #1: All Independent Variables'. Revised 10 Jan 2003 32 . title4 'Stepwise Selection: Model Building Summary'.

Page one of SAS Program 66 Copyright © 2003 Sierra Information Services.htm". Proc Reg Data=advrept. or HTML The HTML destination includes several options to create Table of Contents Table of Pages Example: Use PROC CORR to generate correlation coefficients among several variables and output results to an HTML file Use PROC REG to create several linear regression models and output results to the same HTML file in which the PROC CORR output was sent. Second_Model:model retcap = wcftdt. ® indicates USA registration. var retcap wcftcl wcftdt gearrat logsale. or otherwise. without the prior written permission of the publisher. ods html body="&path\reg1. 65 The HTML Destination ods listing close. mechanical. Revised 10 Jan 2003 33 . or transmitted. label retcap = 'Return on Capital'. electronic. ods proclabel 'Regression Analyses'. stored in a retrieval system. title 'First_Model:Model RETCAP= WCFTCL'. run. No part of this publication may be reproduced. Inc. Sierra Information Inc. var retcap wcftcl wcftdt gearrat logsale.Finance.finance. SAS is a trademark of SAS Institute in the USA and other countries. in any form or by any other means. * var statement. ods proclabel ‘Correlations’. title 'Second Model: model retcap = wcftdt'. photocopying. First_Model:Model RETCAP= WCFTCL. Proc corr nosimple data=advrept.The HTML Destination This destination creates files using the Hypertext Markup Language.

ods html close. in any form or by any other means. or transmitted. ® indicates USA registration. Revised 10 Jan 2003 34 .The HTML Destination Third_Model:model retcap = gearrat. title 'Fourth_Model:model retcap=logsale'. title 'Fifth Model: Multiple Regression'. Page two of SAS Program 67 The HTML Destination HTML output displayed in the SAS Results Viewer. title 'Third_Model:model retcap = gearrat'. stored in a retrieval system. electronic. Sierra Information Inc. *terminates Proc Reg task. run. SAS is a trademark of SAS Institute in the USA and other countries. Fifth_Model:model retcap = wcftcl wcftdt gearrat logsale. ods listing. No part of this publication may be reproduced. run. photocopying. mechanical. Fourth_Model:model retcap=logsale. 68 Copyright © 2003 Sierra Information Services. Inc. quit. or otherwise. without the prior written permission of the publisher.

without the prior written permission of the publisher. The HTML file will contain the Procedure generated output. Inc. ods select all. plus a Table of Contents and a Table of Pages for easy navigation. mechanical. These ODS HTML statements will create an HTML file containing the output from the PROC CORR and PROC REG steps shown earlier.The HTML Destination 69 The HTML Destination Adding a Table of Contents and Table of Pages The next example shows how to create both. ods html path="&path" body='regbody. ods listing close.html' page='regpage.html'. in any form or by any other means. Sierra Information Inc. as required. ® indicates USA registration.html' frame='regframe. SAS is a trademark of SAS Institute in the USA and other countries. but you can just make one. or the other. Revised 10 Jan 2003 35 . No part of this publication may be reproduced. electronic. photocopying. or otherwise. 70 Copyright © 2003 Sierra Information Services. or transmitted. stored in a retrieval system.html' contents='regcontents.

or transmitted.The HTML Destination HTML output with a Table of Contents (top left) and Table of Pages (bottom left). photocopying. Inc. SAS is a trademark of SAS Institute in the USA and other countries. Using the ODS PROCLABEL statement customized the labels in both tables. Using the ODS PROCLABEL statement customized the labels in both tables. stored in a retrieval system. without the prior written permission of the publisher. ® indicates USA registration. Sierra Information Inc. in any form or by any other means. No part of this publication may be reproduced. electronic. 72 Copyright © 2003 Sierra Information Services. 71 The HTML Destination HTML output with a Table of Contents (top left) and Table of Pages (bottom left). mechanical. Revised 10 Jan 2003 36 . or otherwise.

or otherwise. SAS is a trademark of SAS Institute in the USA and other countries. mechanical. Revised 01 Mar 03 74 Copyright © 2003 Sierra Information Services. mechanical. or transmitted. or otherwise. No part of this publication may be reproduced. stored in a retrieval system. California 95476 USA 707 996 7380 SierraInfo @ AOL. electronic. 19229 Sonoma Highway #264 Sonoma. photocopying. Sierra Information Inc. without the prior written permission of the publisher. SAS is a trademark of SAS Institute in the USA and other countries. No part of this publication may be reproduced. Sierra Information Inc. ® indicates USA registration. stored in a retrieval system. Inc. Karp Sierra Information Services. without the prior written permission of the publisher. electronic. Inc. or transmitted. Inc. in any form or by any other means.Summary/Conclusions End of ODS 101 73 ODS 201: Making Life Easier with the SAS® Output Delivery System Presented By: Andrew H. Revised 10 Jan 2003 37 .com Copyright © 2003 Sierra Information Services. in any form or by any other means.COM http://www. photocopying. ® indicates USA registration.SierraInformation.

proc logistic data=sugi28.” either explicit or implicit: the selection list is re-set to ALL Unless the PERSIST option is used. model respond = risk_score. without the prior written permission of the publisher. 76 Copyright © 2003 Sierra Information Services. model respond = customer_age. This example demonstrates “run-group persistence” of ODS object selection. run. stored in a retrieval system. Sierra Information Inc. ods output fitstatistics=model1. or otherwise.predmodel descending. proc logistic data=sugi28. Why? Because the selection list was automatically reset to ALL after the first run-group completed processing. or transmitted. photocopying. mechanical. At the end of a “run-group.predmodel descending. SAS is a trademark of SAS Institute in the USA and other countries. title 'ODS for Data Analysts and Statisticians'. the selection/exclusion “supports rungroup” processing (for most PROCs). ods proclabel = 'Respond=Risk Score'. ods proclabel = 'Respond=Customer Age'. but was not applied to the second task. title2 'Predictive Modeling'. run. electronic. (Explicit Step Boundary) ods output fitstatistics = model2.Persistence of Object Selection/Exclusion The selection or exclusion of objects is said to “persist” for the duration of a procedure More formally. ® indicates USA registration. 75 Persistence of Object Selection/Exclusion ods select fitstatistics. Revised 10 Jan 2003 38 . The ODS SELECT FITSTATISTICS statement is applied to the first PROC LOGISTIC task. No part of this publication may be reproduced. Inc. in any form or by any other means.

or transmitted. in any form or by any other means. ods proclabel = 'Ex 9a: Respond = Customer Age'.model1. 77 Persistence of Object Selection/Exclusion * Example 9: The Persist Option. run. ods output fitstatistics=sugi28. model respond = risk_score. ods select fitstatistics(persist). ods proclabel = 'Ex 9b: Respond=Risk Score'.predmodel descending. SAS is a trademark of SAS Institute in the USA and other countries. photocopying. mechanical. ® indicates USA registration. or “persist” across Procedure Steps. run. Continued on next page… ods listing. proc logistic data=sugi28. No part of this publication may be reproduced. stored in a retrieval system. model respond = customer_age. Why? Because the selection list was automatically reset to ALL after the first run-group completed processing.Persistence of Object Selection/Exclusion This example demonstrates “run-group persistence” of ODS object selection. title2 'Predictive Modeling'. but was not applied to the second task. 78 Copyright © 2003 Sierra Information Services. ods listing close. The ODS SELECT FITSTATISTICS statement is applied to the first PROC LOGISTIC task. What we need is a way to have the selection remain in effect.predmodel descending. without the prior written permission of the publisher. Sierra Information Inc. Revised 10 Jan 2003 39 . electronic. Inc. title 'ODS for Data Analysts and Statisticians'. ods output fitstatistics = sugi28.model2. or otherwise. proc logistic data=sugi28.

proc logistic data=sugi28. ® indicates USA registration. without the prior written permission of the publisher. *<=== re-set selection list. photocopying.predmodel descending. No part of this publication may be reproduced. or otherwise.Persistence of Object Selection/Exclusion ods output fitstatistics = sugi28. ods proclabel = 'Ex 9c: Respond = Income'. Revised 10 Jan 2003 40 . Sierra Information Inc. This selection will now remain in effect (persist) for all applications of PROC LOGISTIC. stored in a retrieval system. mechanical. or transmitted. SAS is a trademark of SAS Institute in the USA and other countries. in any form or by any other means.model3. electronic. until the selection list is explicitly re-set by using ODS SELECT ALL. run. Using ODS LISTING CLOSE/ODS LISTING for Example 9b further restricted the output to “just” a SAS data set. Inc. model respond = income. 79 Persistence of Object Selection/Exclusion The Results Window on the left shows the results of applying the PERSIST option in the ODS SELECT statement. ods select all. 80 Copyright © 2003 Sierra Information Services. Only the FITSTATISTICS Object is created by each PROC LOGISTIC task. This example demonstrates how the PERSIST option in the ODS SELECT statement is used to over-ride the default reset of the object selection list at the end of each PROC LOGISTIC step. as is shown above.

Inc. Use SAS data set options to “shape” each output data set so they contain just the observations/variables needed at subsequent points in the process 82 Copyright © 2003 Sierra Information Services. mechanical.Persistence of Object Selection Across Procedure Steps Using the PERSIST=PROC and MATCH_ALL options in the ODS OUTPUT Statement PERSIST=PROC instructs SAS to keep the the selection or exclusion lists in effect after a procedure step boundary MATCH_ALL instructs SAS to create a new SAS data set for each object it creates When only one data set is created. in any form or by any other means. No part of this publication may be reproduced. When multiple data sets are created. Revised 10 Jan 2003 41 . or transmitted. Sierra Information Inc. the data set name created is the one specified in the ODS OUTPUT statement. or otherwise. SAS is a trademark of SAS Institute in the USA and other countries. ® indicates USA registration. stored in a retrieval system. photocopying. electronic. without the prior written permission of the publisher. then SAS appends digits to the name of the data set given in the ODS OUTPUT statement 81 Persistence of Object Selection Across Procedure Steps Task: Compare five logistic regression models Use the AIC (Akaike Information Criterion) to assess “better” versus “worse” models Steps: Have ODS create a SAS data set containing the AIC for each of the five models.

electronic. or transmitted. ® indicates USA registration. 84 Copyright © 2003 Sierra Information Services. in any form or by any other means. or otherwise. mechanical. run. * select fitstatistics table. proc print data=fit_test. * re-open listing destination. title3 'FITSTATISTICS Object as a SAS Data Set'. Sierra Information Inc. write the ODS OUTPUT Statement so that Only the desired observations/variables are output to the data sets SAS data set options are applied to the output data sets A new data set is created for each logistic regression model The MATCH_ALL Option 83 Persistence of Object Selection Across Procedure Steps options nodate nonumber nocenter. * run one model to see what we get. model respond=income. SAS is a trademark of SAS Institute in the USA and other countries. Revised 10 Jan 2003 42 . ods listing. stored in a retrieval system. photocopying. title2 'Comparing Logistic Regression Models'. title1 'ODS for Data Analysts and Statisticians'. proc logistic data=predmodel descending.Persistence of Object Selection Across Procedure Steps Initial step: run one model and look at output SAS data set Once we know what the output data set looks like. Inc. ods listing close. without the prior written permission of the publisher. run. * close listing destination. ods output fitstatistics=fit_test. ods select fitstatistics. No part of this publication may be reproduced.

photocopying. electronic.076 9509. etc.900 9518. mechanical. Inc.251 9527.Persistence of Object Selection Across Procedure Steps ODS for Data Analysts and Statisticians Comparing Logistic Regression Models FITSTATISTICS Object as a SAS Data Set Intercept Only 9511. Restricts observations in output data set to those satisfying conditions in the WHERE clause Drops the automatically created variables _RUN_ and _PROC_ from each output data set 86 DROP SAS data set Copyright © 2003 Sierra Information Services. stored in a retrieval system. subsequent data sets are named AIC1.813 9509. or transmitted. or otherwise.900 Intercept And Covariates 9513. SAS is a trademark of SAS Institute in the USA and other countries. AIC2. in any form or by any other means. Sierra Information Inc. without the prior written permission of the publisher. ® indicates USA registration. Statement/Option PERSIST=PROC MATCH_ALL (PERSIST=PROC MATCH_ALL)=AIC WHERE clause option What It Does Output Destination remains open across multiple procedure step boundaries Create a new data set each time an Object is sent to the OUTPUT Destination AIC is the name of the first data set created.251 Obs 1 2 3 Criterion AIC SC -2 Log L 85 Persistence of Object Selection Across Procedure Steps ods output fitstatistics(persist = proc match_all) = AIC(where=(upcase(criterion) = 'AIC') drop = _run_ _proc_). Revised 10 Jan 2003 43 . No part of this publication may be reproduced.

proc logistic data=predmodel descending. Sierra Information Inc. or otherwise. SAS is a trademark of SAS Institute in the USA and other countries. proc logistic data=predmodel descending. model respond = income credit_card_balance risk_score length_of_residence. run. or transmitted. ods listing. No part of this publication may be reproduced. ods select fitstatistics. without the prior written permission of the publisher. model respond = length_of_residence. Inc. in any form or by any other means. proc logistic data=predmodel descending. * select fitstatistics table. * reset listing destination to ON. run. proc logistic data=predmodel descending. Revised 10 Jan 2003 44 . stored in a retrieval system. ods output fitstatistics(persist = proc match_all) = AIC( where=(upcase(criterion) = 'AIC') drop = _run_ _proc_). * close listing destination. proc logistic data=predmodel descending. run. model respond=credit_card_balance. 87 Persistence of Object Selection Across Procedure Steps 88 Copyright © 2003 Sierra Information Services. run. model respond=risk_score.Persistence of Object Selection Across Procedure Steps ods listing close. photocopying. ® indicates USA registration. model respond=income. electronic. * reset selection list. mechanical. run. ods select all.

title 'ODS for Data Analysts & Statisticians'. title2 'Comparing AIC Statistics for Logistic Regression Models'. 89 Persistence of Object Selection Across Procedure Steps data compare. run. photocopying. else if e then indepvar = 'All Variables'. 90 Copyright © 2003 Sierra Information Services. run. electronic. stored in a retrieval system. title2 'Data Set AIC'. ® indicates USA registration. Revised 10 Jan 2003 45 . else if d then indepvar = 'Length_of_Residence'. SAS is a trademark of SAS Institute in the USA and other countries. else if c then indepvar = 'Risk_Score'. without the prior written permission of the publisher.Persistence of Object Selection Across Procedure Steps proc print data=aic. if a then indepvar = 'Income'. No part of this publication may be reproduced. Sierra Information Inc. in any form or by any other means. proc print data=compare. Inc. length indepvar $ 20. mechanical. or transmitted. title 'ODS for Data Analysts & Statisticians'. set aic(in=a) aic1(in=b) aic2(in=c) aic3(in=d) aic4(in=e). or otherwise. else if b then indepvar = 'Credit_Card_Balance'. run.

SAS is a trademark of SAS Institute in the USA and other countries. in any form or by any other means. stored in a retrieval system. Revised 10 Jan 2003 46 . or transmitted.Persistence of Object Selection Across Procedure Steps 91 Concatenating ODS-generated Data Sets in a Data Step When the MATCH_ALL and PERSIST options are used in the ODS OUTPUT statement. 92 Copyright © 2003 Sierra Information Services. This is easily accomplished by specifying a macro variable name as part of the MATCH_ALL option. SAS then stores the names of all the data sets it creates in a macro variable which can be used in a subsequent data step. No part of this publication may be reproduced. mechanical. without the prior written permission of the publisher. or otherwise. ® indicates USA registration. Sierra Information Inc. electronic. photocopying. In many situations the next step in the project would be to concatenate them in to one big data set. Inc. a separate data set is created for each output object.

This Procedure Step will generate parameter estimates for three separate models. holds the names of the data sets. SAS is a trademark of SAS Institute in the USA and other countries. or transmitted. proc logistic data=predmodel descending. No part of this publication may be reproduced. in any form or by any other means. stored in a retrieval system.Concatenating ODS-generated Data Sets in a Data Step ods proclabel = 'EX 11: Creating Macro Var'. mechanical. electronic.VMACRO) called MACROVAR. A variable in the Macro Symbol Table (SASHELP. ® indicates USA registration. RESULTS1 and RESULTS2. Sierra Information Inc. or otherwise. ods output parameterestimates (match_all=macrovar) = Results. one for each value of the variable Territory. Inc. The ODS OUTPUT Statement will create three separate SAS data sets holding the parameter estimates. Revised 10 Jan 2003 47 . 93 Concatenating ODS-generated Data Sets in a Data Step 94 Copyright © 2003 Sierra Information Services. ods select parameterestimates. Their names are RESULTS. photocopying. model respond = income credit_card_balance risk_score length_of_residence. without the prior written permission of the publisher. run. by Territory.

The SYMBOLGEN SAS System option controls whether the results of macro symbol resolutions are written to the SASLOG. mechanical. Inc.RESULTS1. ® indicates USA registration. 96 Copyright © 2003 Sierra Information Services. set &macrovar.Concatenating ODS-generated Data Sets in a Data Step * ex 12: concatenate separate data sets. 95 Concatenating ODS-generated Data Sets in a Data Step 645 646 647 * ex 12: concatenate separate data sets. run. Sierra Information Inc. without the prior written permission of the publisher. stored in a retrieval system. photocopying. data combine. SAS is a trademark of SAS Institute in the USA and other countries.RESULTS2. proc print data=combine. NOTE: There were 5 observations read from the data set WORK. SYMBOLGEN: Macro variable MACROVAR resolves to RESULTS RESULTS1 RESULTS2 648 649 set &macrovar. run. NOTE: DATA statement used (Total process time): real time 0.07 seconds NOTE: The data set WORK.13 seconds cpu time 0. title2 'Combining ODS-generated Data Sets'. No part of this publication may be reproduced. title1 'ODS for Data Analysts & Statisticians'. in any form or by any other means. NOTE: There were 5 observations read from the data set WORK. The shipped default option setting is NOSYMBOLGEN. run. electronic. NOTE: There were 5 observations read from the data set WORK. Revised 10 Jan 2003 48 . options symbolgen.COMBINE has 15 observations and 7 variables.RESULTS. or transmitted. options symbolgen. data combine. or otherwise.

® indicates USA registration.888E-7 0.9120 0. photocopying.0147 0.0007 1.00173 8.3405 0.4923 0.000857 1.4508 0.0171 0.00106 0.5511 0.2478 0.3806 1.0885 0.8009 0.991E-7 0.0208 -0.5019 0.6187 0.6008 0.6573 0.00144 8.312E-6 0.3553 2.000981 0.9082 0. mechanical.307E-8 -0.000732 -0.00141 0. Inc.00146 1. or transmitted. or otherwise.000237 3. without the prior written permission of the publisher.1082 0.6265 0.4883 0.0058 0.617E-6 -0.0133 0.4803 0.9795 0.2400 0.00733 0.403E-6 0. Revised 10 Jan 2003 49 . Sierra Information Inc.7067 0.0350 Prob ChiSq 0. No part of this publication may be reproduced. SAS is a trademark of SAS Institute in the USA and other countries.9084 0.00116 2.00120 0.1144 0.0265 7.8706 0. electronic.Concatenating ODS-generated Data Sets in a Data Step ODS for Data Analysts & Statisticians Combining ODS-generated Data Sets Obs 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 territory Great Basin Great Basin Great Basin Great Basin Great Basin Pacific NW Pacific NW Pacific NW Pacific NW Pacific NW South West South West South West South West South West Variable Intercept INCOME credit_card_balance risk_score length_of_residence Intercept INCOME credit_card_balance risk_score length_of_residence Intercept INCOME credit_card_balance risk_score length_of_residence DF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Estimate -1.5809 0.2229 0.00261 StdErr 0.1353 0.00011 -0.4855 0.0122 0. stored in a retrieval system.8516 97 Persistence of ODS Object Creation With Run-Group Processing Some SAS Procedures support “run group processing” PROC REG PROC PLOT PROC ARIMA (SAS/ETS Software) The PERSIST=RUN statement is used to generate output objects with PROCs that support run-group processing 98 Copyright © 2003 Sierra Information Services.0140 WaldChiSq 2. in any form or by any other means.

var depvar y1-y7. described in the ODS Y5 : Model depvar = Y5. the procedure. proc reg data=sugi28. or transmitted. destination is re-set to “on” run. generated in a single use of run. destination is CLOSED. mechanical. Inc. ods output clear. ® indicates USA registration. ods listing. created. at the end of the PROC REG quit. The LISTING run. Sierra Information Inc. in any form or by any other means. photocopying. The LISTING Y6 : Model depvar = Y6. task. electronic. or otherwise.regressdata. so Y4 : Model depvar = Y4. Y3 : Model depvar = Y3. OUTPUT STATEMENT are run. Y1 : Model depvar = Y1. stored in a retrieval system. Revised 10 Jan 2003 50 . Y7: Model depvar = Y7. only the SAS data sets run. ods listing close. ods output fitstatistics(match_all=outlist persist = run) = fit (keep=model label2 cvalue2 where=(upcase(label2) =: 'R-SQ')). SAS is a trademark of SAS Institute in the USA and other countries. This PROC REG task shows run. how multiple models are Y2 : Model depvar = Y2. 100 Copyright © 2003 Sierra Information Services. without the prior written permission of the publisher.Persistence of ODS Object Creation With Run-Group Processing Task: Run several linear regression models (with a common dependent variable) Output just the R-square (coefficient of determination) value from each model to SAS data sets Concatenate the R-square values in to one data set Sort values from highest to lowest Print results Do not sent output to the LISTING destination (the Output Window) 99 Persistence of ODS Object Creation With Run-Group Processing * Ex 13: Run-Group Persistence. No part of this publication may be reproduced.

Persistence of ODS Object Creation With Run-Group Processing Since the listing destination was closed. Revised 10 Jan 2003 51 . or transmitted. The only output therefore generated by PROC REG task were the SAS data sets containing the specified elements from the FITSTATISTICS object. without the prior written permission of the publisher. photocopying. variable Cvalue2 hold the computed value of R-Square (0. or otherwise.8895). in any form or by any other means. electronic. 102 Copyright © 2003 Sierra Information Services. stored in a retrieval system. Inc. Finally. 101 Persistence of ODS Object Creation With Run-Group Processing SAS Data Set created by ODS. Notice that variable label (“Y1”) is captured by the variable named “Model” and that variable “Label2” stores the name of the statistic of interest (R-Square). No part of this publication may be reproduced. mechanical. ® indicates USA registration. SAS is a trademark of SAS Institute in the USA and other countries. the only ODS destination open when the PROC REG task executed was the OUTPUT destination. Sierra Information Inc.

After a PROC SORT step. title3 'Sorted in Descending Value'. set &outlist. without the prior written permission of the publisher. The macro variable OUTLIST contains the names of all the data sets created when the PROC REG task on the previous page executed. photocopying. proc print data=combine. Revised 10 Jan 2003 52 . the data set contains the results from lowest to highest value of R-square 104 Copyright © 2003 Sierra Information Services. run. No part of this publication may be reproduced. Sierra Information Inc. They are concatenated in this data step and then printed. ® indicates USA registration. title2 'R-Square Statistics for Seven Linear Regression Models'. electronic. run. by descending value. Inc. stored in a retrieval system.Persistence of ODS Object Creation With Run-Group Processing 103 Persistence of ODS Object Creation With Run-Group Processing options symbolgen. data combine( rename=(cvalue2 = value label2 = statistic)). or transmitted. mechanical. in any form or by any other means. proc sort data=combine. or otherwise. SAS is a trademark of SAS Institute in the USA and other countries. run.

photocopying. in any form or by any other means. The statistics of interest were “stacked” in to one data set The “stacked” data set was then sorted in descending value of the R-square statistic. 106 Copyright © 2003 Sierra Information Services. or otherwise.2154 0. without the prior written permission of the publisher. ® indicates USA registration. SAS is a trademark of SAS Institute in the USA and other countries. one for each linear regression model The R-Square values from the data sets were concatenated in to one “big” data set.8895 0.0049 0. Sierra Information Inc.2927 0. Inc. Revised 10 Jan 2003 53 .0009 105 Working with ODS Objects: Another Example In the previous example Several SAS data sets from FITSTATISTICS Objects were created.Persistence of ODS Object Creation With Run-Group Processing ODS for Data Analysts and Statisticians R-Square Statistics for Seven Linear Regression Models Sorted in Descending Value Obs 1 2 3 4 5 6 7 Model Y7 Y2 Y1 Y6 Y5 Y4 Y3 statistic R-Square R-Square R-Square R-Square R-Square R-Square R-Square value 0. mechanical. stored in a retrieval system. or transmitted.0385 0. electronic. thus putting the “best” model at the “top” of the data set. and then ordered from highest (“better”) to lowest (“worse”) value.7150 0. No part of this publication may be reproduced.

Revised 10 Jan 2003 54 . electronic. without the prior written permission of the publisher. photocopying.regressdata. and some of its observations are shown on the page following the code sample. Inc. or transmitted. run. ods output subsetselsummary=allpossiblemodels( drop=control model). 108 Copyright © 2003 Sierra Information Services. model depvar=y1-y7/selection=adjrsq. title3 'First 10 observations'. in any form or by any other means. Sierra Information Inc.Assessing Competing Multiple Linear Regression Models Using ODS In the next example. ods listing close. No part of this publication may be reproduced. 107 Assessing Competing Multiple Linear Regression Models Using ODS * EX 16: Optimal Subset Selection. title2 'Data Set Allpossiblemodels'. quit. SAS is a trademark of SAS Institute in the USA and other countries. ® indicates USA registration. according to the instructions in the program on the next page. This object is rendered as a SAS data set. proc print data=allpossiblemodels(obs=10). proc reg data=sugi28. or otherwise. stored in a retrieval system. ODS is used to facilitate selection of an “optimal” or “best” subset of independent variables When SELECTION = ADJRSQ (Adjusted R-Square) is specified as an option in the MODEL Statement the SUBSETSELSUMMARY (Subset Selection Summary) Object is created. ods select subsetselsummary. mechanical. ods listing.

9135 0. ® indicates USA registration. photocopying. Revised 10 Jan 2003 55 . mechanical.9075 0.9060 RSquare 0.9196 0.9078 0. Inc.9190 0.9164 0.9137 VarsInModel Y2 Y2 Y1 Y2 Y2 Y1 Y2 Y2 Y1 Y2 Y3 Y3 Y2 Y3 Y6 Y2 Y3 Y4 Y2 Y5 Y4 Y6 Y3 Y4 Y7 Y3 Y5 Y6 Y3 Y6 Y6 Y7 Y7 Y4 Y6 Y7 Y5 Y6 Y7 Y6 Y7 Y6 Y7 Y7 Y4 Y5 Y6 Y7 Y7 109 Assessing Competing Multiple Linear Regression Models Using ODS The first observation in the output data set contains the combination of independent variables that maximizes the adjusted coefficient of determination (adjusted R-square) The “adjustment” is to add a “penalty” to models that have “too many” or “extraneous” independent variables 110 Copyright © 2003 Sierra Information Services. without the prior written permission of the publisher.9143 0. stored in a retrieval system.9067 0. in any form or by any other means.Assessing Competing Multiple Linear Regression Models Using ODS SAS ODS for Data Analysts & Statisticians Data Set Allpossiblemodels First 10 observations Obs 1 2 3 4 5 6 7 8 9 10 Dependent DEPVAR DEPVAR DEPVAR DEPVAR DEPVAR DEPVAR DEPVAR DEPVAR DEPVAR DEPVAR NumIn Model 5 4 6 6 3 5 5 4 7 4 Adjrsq 0. electronic. SAS is a trademark of SAS Institute in the USA and other countries. No part of this publication may be reproduced.9192 0.9088 0.9169 0.9098 0.9069 0. Sierra Information Inc. or otherwise.9083 0.9063 0.9197 0.9079 0. or transmitted.9162 0.

model depvar = &best. stored in a retrieval system. run. call symput('best'. Sierra Information Inc. mechanical. quit. electronic. and then used in a subsequent PROC REG task to generate parameter estimates and other measures of model performance for the “optimal subset” of independent variables. Data set WINNER therefore contains the (statistically) “best” combination of independent variables according to the adjusted R-square measure. No part of this publication may be reproduced. data _null_. Revised 10 Jan 2003 56 . SAS is a trademark of SAS Institute in the USA and other countries. or transmitted.varsinmodel). proc reg data=sugi28. options symbolgen. ods output parameterestimates = bestsubset.regressdata. set allpossiblemodels(obs=1). ® indicates USA registration. title2 'Optimal Subset Selection with ODS'. 112 Copyright © 2003 Sierra Information Services. in any form or by any other means. Inc. 111 Assessing Competing Multiple Linear Regression Models Using ODS The Data _NULL_ step creating data set “winner” reads the just first observation from data set ALLPOSSIBLEMODELS. without the prior written permission of the publisher.Assessing Competing Multiple Linear Regression Models Using ODS By applying a combination of Data Step functionalities Macro Language functionalities We can have the independent variables for the “winning” (statistically optimal model) output to a macro variable. or otherwise. photocopying.

NOTE: There were 1 observations read from the data set WORK.83 2. electronic.0741 0.63 -1. Inc.Assessing Competing Multiple Linear Regression Models Using ODS 32 33 34 35 data _null_.92 Pr > |t| 0.36 seconds cpu time 0.24 -1.49281 0.42848 t Value 1.94966 -0. NOTE: DATA statement used (Total process time): real time 0.17711 Standard Error 396.53696 1.38640 27. 39 proc reg data=sugi28.60873 0. in any form or by any other means.59232 0.0117 0. 38 ods output parameterestimates = bestsubset.regressdata.80240 -0.96079 14.60 -1.41891 Sum of Squares 167099839 14718564 181818403 R-Square Adj R-Sq Mean Square 33419968 334513 F Value 99.91 Pr > F <.0001 0.1160 0. mechanical.9098 Parameter Estimates Variable Intercept Y2 Y3 Y4 Y6 Y7 Label Intercept Indep Var Indep Var Indep Var Indep Var Indep Var 2 3 4 6 7 DF 1 1 1 1 1 1 Parameter Estimate 725.36286 0. Sierra Information Inc. or otherwise.9190 0. 113 Assessing Competing Multiple Linear Regression Models Using ODS SAS ODS for Data Analysts & Statisticians Optimal Subset Selection with ODS The REG Procedure Model: MODEL1 Dependent Variable: DEPVAR Dependent Variable Analysis of Variance Source Model Error Corrected Total Root MSE Dependent Mean Coeff Var DF 5 44 49 578.0001 114 Copyright © 2003 Sierra Information Services. photocopying. SYMBOLGEN: Macro variable BEST resolves to Y2 Y3 Y4 Y6 Y7 41 title2 'Optimal Subset Selection with ODS'.79 9. ® indicates USA registration.varsinmodel). SAS is a trademark of SAS Institute in the USA and other countries.64717 0.12 seconds 36 37 options symbolgen.2216 0.0804 <.ALLPOSSIBLEMODELS. Revised 10 Jan 2003 57 . run.95415 -0. without the prior written permission of the publisher.37083 2109. call symput('best'. or transmitted. 40 model depvar = &best. stored in a retrieval system. set allpossiblemodels(obs=1). No part of this publication may be reproduced. 42 quit.

No part of this publication may be reproduced.10 116 Copyright © 2003 Sierra Information Services. mechanical.10 Red if the p-value is greater than .05 Blue if the p-value is between .Review So far. Revised 10 Jan 2003 58 .” This process is very easy to implement in PROCs REPORT and TABULATE Example: using the regression analysis results data set. photocopying.05 and . portray the value of the variable representing pvalue as: Green if the p-value is less than . SAS is a trademark of SAS Institute in the USA and other countries. Sierra Information Inc. stored in a retrieval system. we’ve seen some ODS capabilities: Create/manage output objects Selection of objects Persistence of selection lists across PROC or RUN groups PERSIST=PROC or PERSIST = RUN MATCH_ALL MATCH_ALL=macrovar ODS PROCLABEL statement ODS Destinations OUTPUT : to create a SAS data set Using SAS data set options in the ODS OUTPUT statement LISTING : control what is sent to the output window ODS LISTING CLOSE/ODS LISTING 115 Traffic Lighting “Traffic Lighting” refers to process of displaying different colors to the values of variables based on some “decision rule. without the prior written permission of the publisher. in any form or by any other means. Inc. or otherwise. or transmitted. ® indicates USA registration. electronic.

mechanical.. or transmitted. value pvalf low . Inc. in any form or by any other means. ® indicates USA registration. 118 Copyright © 2003 Sierra Information Services. without the prior written permission of the publisher.high = 'red'. No part of this publication may be reproduced. Sierra Information Inc. Revised 10 Jan 2003 59 .0999999 = 'blue' .0499999 = 'green' .. stored in a retrieval system.05 . SAS is a trademark of SAS Institute in the USA and other countries. run.1 . electronic. photocopying.Traffic Lighting How can we assign colors to the p-values? 117 Traffic Lighting This example of traffic lighting was created by: Generating a format Applying the format and other ODS style definitions within PROC REPORT proc format. or otherwise.

define label/'Variable/Label' style(column)=[fontweight=bold].Traffic Lighting options nonumber nodate nocenter. Sierra Information Inc. title1 'ODS for Data Analysts and Statisticians'. run. or transmitted. electronic. column Variable DF Estimate StdErr tValue Probt Label . photocopying. ® indicates USA registration. SAS is a trademark of SAS Institute in the USA and other countries. proc report data=bestsubset split = '/' nowindows. 119 Traffic Lighting 120 Copyright © 2003 Sierra Information Services. or otherwise. Inc. define probt/'P/Value' style(column)=[foreground=pvalf. No part of this publication may be reproduced. in any form or by any other means. ods listing. font_weight=bold].pdf" style=sasweb. define estimate/display 'Parameter/Estimate' style(column)=[font_weight=bold]. title2 'Parameter Estimates from Best Subset'. without the prior written permission of the publisher. stored in a retrieval system. define DF/display 'Degrees/of/Freedom'. mechanical. define dependent/display 'Dependent/Variable' style(column)=[font_weight=bold]. define stderr/display 'Standard/Error' . ods listing close. ods pdf close. ods pdf file = "&path\bestsubset. title3 'SASWEB ODS Style w/Style Elements Added in PROC Report'. define tvalue/display 'Test/Statistic'. Revised 10 Jan 2003 60 .

use the HTML Destination Use XLS as the file extension Excel can read HTML files! 121 Using the HTML Destination to Create Excel Spreadsheets ods listing close. electronic. define DF/display 'Degrees/of/Freedom'. define dependent/display 'Dependent/Variable' style(column)=[font_weight=bold].xls" style=sasweb. without the prior written permission of the publisher. define probt/'P/Value' style(column)=[foreground=pvalf. No part of this publication may be reproduced. define stderr/display 'Standard/Error' . Sierra Information Inc. 122 Copyright © 2003 Sierra Information Services. ® indicates USA registration. in any form or by any other means.Using the HTML Destination to Create Excel Spreadsheets An “XLS Destination” is not available Instead. photocopying. Inc. run. title2 'Parameter Estimates from Best Subset'. font_weight=bold]. mechanical. define label/'Variable/Label' style(column)=[fontweight=bold]. ods listing. Revised 10 Jan 2003 61 . SAS is a trademark of SAS Institute in the USA and other countries. title3 'Creating an Excel Spreadsheet from the ODS HTML Destination'. define tvalue/display 'Test/Statistic'. ods html close. title1 'ODS for Data Analysts and Statisticians'. proc report data=bestsubset split = '/' nowindows. or otherwise. column Variable DF Estimate StdErr tValue Probt Label . or transmitted. stored in a retrieval system. define estimate/display 'Parameter/Estimate' style(column)=[font_weight=bold]. ods html file = "&path\bestsubset.

Sierra Information Inc. photocopying. or transmitted. No part of this publication may be reproduced. stored in a retrieval system. ® indicates USA registration. we assigned colors to the individual values of the variables by applying a user-created Format (PVALF. 124 Copyright © 2003 Sierra Information Services. or otherwise. make the entire row yellow and the text italic. mechanical. SAS is a trademark of SAS Institute in the USA and other countries. without the prior written permission of the publisher. electronic. Inc.05. in any form or by any other means. Revised 10 Jan 2003 62 .Using the HTML Destination to Create Excel Spreadsheets 123 One More Example: Using ODS Style Statements in PROC REPORT Question: How can I traffic-light an entire row of my PROC REPORT-generated output based on the values of one of the columns (variables) in the report? Previously.) How can I change the appearance of an entire row of the output report? Example: if the p-value is less than .

call define(_row_.05 then do. end.pdf" style=sasweb. ods listing close.05 then do. 'Parameter Estimates from Best Subset'. call define(_row_. probt/display 'P/Value' style(column)=[font_weight=bold]. ods pdf file = "&path\bestsubset2. title1 title2 title3 title4 endcomp. "STYLE=[background=gold font_style=italic]"). No part of this publication may be reproduced. stderr/display 'Standard/Error' . mechanical.One More Example: Using ODS Style Statements in PROC REPORT * ex 23: assign color to row based on p-value. 'ODS for Data Analysts and Statisticians'. else if probt > . estimate/display 'Parameter/Estimate' style(column)=[font_weight=bold]. 126 Copyright © 2003 Sierra Information Services. 125 One More Example: Using ODS Style Statements in PROC REPORT compute probt. end. or transmitted. if probt <= . SAS is a trademark of SAS Institute in the USA and other countries."STYLE". run. define label/'Variable/Label' style(column)=[font_weight=bold]. stored in a retrieval system."STYLE=[background=white]"). Revised 10 Jan 2003 63 . tvalue/display 'Test/Statistic'. without the prior written permission of the publisher. DF/display 'Degrees/of/Freedom'. Sierra Information Inc. photocopying. variable/display 'Dependent/Variable' style(column)=[font_weight=bold]. Inc. electronic."STYLE". options nonumber nodate nocenter. 'Using ODS Style Statements in PROC REPORT to Identify'. proc report data=bestsubset split = '/' nowindows style(header)=[font_weight=bold foreground=orange]. column define define define define define define Variable DF Estimate StdErr tValue Probt Label . in any form or by any other means. 'Statistically Significant Parameter Estimates'. ods listing. or otherwise. ® indicates USA registration. ods pdf close.

0 ODS Statistical Graphics Experimental in 9. ® indicates USA registration. Revised 10 Jan 2003 64 .1 128 Copyright © 2003 Sierra Information Services.1? New ODS Destinations PROC DOCUMENT Production in 9. photocopying. or otherwise.One More Example: Using ODS Style Statements in PROC REPORT 127 What’s New In SAS 9/9. without the prior written permission of the publisher. mechanical. Inc. Sierra Information Inc. electronic. in any form or by any other means. SAS is a trademark of SAS Institute in the USA and other countries. stored in a retrieval system. No part of this publication may be reproduced. or transmitted.

mechanical. stored in a retrieval system.PROC DOCUMENT The new DOCUMENT destination allows you to Store ODS objects in “raw form” as documents Documents can be Modified/edited Replayed Saved for future use 129 The Document Window Submitting the ODSDOCUMENT command opens the new (to SAS 9) Document Window dm 'odsdocument'. without the prior written permission of the publisher. Sierra Information Inc. electronic. photocopying. ® indicates USA registration. Revised 10 Jan 2003 65 . The Document Window can also be opened with the DM (Display Manager) Command 130 Copyright © 2003 Sierra Information Services. No part of this publication may be reproduced. SAS is a trademark of SAS Institute in the USA and other countries. or otherwise. or transmitted. in any form or by any other means. Inc.

stored in a retrieval system. run. proc logistic data=sasdata. Inc.10 to . title 'Global Title1: A Peek at PROC DOCUMENT'. ods document close. or otherwise. documents are temporary files and are stored in the WORK Library. New to Version 9 132 Copyright © 2003 Sierra Information Services. without the prior written permission of the publisher. format ins insfmt. or transmitted. By opening (and then closing) the DOCUMENT Destination. 131 The ODS DOCUMENT Statement Document Destination Icons in the Document Window. Revised 10 Jan 2003 66 . Sierra Information Inc.insurance descending.The ODS DOCUMENT Statement ods document name=mydoc1 . model ins= ddabal acctage atmamt crscore income posamt savbal/ selection = stepwise ctable pprob = . No part of this publication may be reproduced.50 by . mechanical. title2 'Predictive Model via PROC LOGISTIC'. SAS is a trademark of SAS Institute in the USA and other countries.10. a document called MYDOC1 is created and shown in the DOCUMENT Window. ® indicates USA registration.. photocopying. electronic. ods proclabel 'Predictive Model'. By default. in any form or by any other means.

electronic. in any form or by any other means.Working in the DOCUMENT Window Output Destinations can now be specified from the “Open As…” window. Sierra Information Inc. photocopying. stored in a retrieval system. or transmitted. 133 PROC DOCUMENT Capabilities Transform report without rerunning the analysis or repeating the data base query Control the report’s structure Display output to any other ODS Destination without having to rerun your SAS programs Manage output Store the output 134 Copyright © 2003 Sierra Information Services. Inc. No part of this publication may be reproduced. Revised 10 Jan 2003 67 . ® indicates USA registration. This permits you to send objects to multiple output destinations without having to re-run the procedure every time you need the output sent to a different destination. without the prior written permission of the publisher. SAS is a trademark of SAS Institute in the USA and other countries. or otherwise. mechanical.

Sierra Information Inc. Inc. ® indicates USA registration.php 136 Copyright © 2003 Sierra Information Services.Learning About the ODS DOCUMENT Destination and PROC DOCUMENT http://support. No part of this publication may be reproduced. mechanical. or transmitted. Revised 10 Jan 2003 68 . in any form or by any other means. or otherwise. without the prior written permission of the publisher. SAS is a trademark of SAS Institute in the USA and other countries. stored in a retrieval system.com/html/active/Past_PresentationsGrid. photocopying.sas.com/rnd/base/topics/odsdocument/ 135 “A Peek at PROC DOCUMENT” PDF Version at http://sierrainformation. electronic.

PROC TEMPLATE will be update to include Experimental Graph Template Statements Control the appearance of the graphs using PROC TEMPLATE 137 ODS Statistical Graphics ODS Statistical Graphics SAS/GRAPH™ software is not required to use the ODS Statistical Graphics features ODS Statistical Graphics can be output to multiple destinations Bob Rodriquez’ presentation on ODS Statistical Graphics in the SAS Demonstration Area at SUGI 28 Here is an advance look.ODS Statistical Graphics Experimental in SAS 9. ® indicates USA registration. at a small part of his presentation 138 Copyright © 2003 Sierra Information Services. SAS is a trademark of SAS Institute in the USA and other countries. Revised 10 Jan 2003 69 . Sierra Information Inc. in any form or by any other means. without the prior written permission of the publisher. or otherwise. No part of this publication may be reproduced. or transmitted. mechanical. Inc. electronic. photocopying.1 SAS/STAT and SAS/ETS Module procedures will be able to generate statistical graphics when the ODS GRAPHICS statement is given prior to the procedure task. courtesy of Bob. stored in a retrieval system.

or otherwise. ® indicates USA registration. without the prior written permission of the publisher. proc robustreg RDPlot(label=outlier) HistPlot QQPlot. in any form or by any other means. SAS is a trademark of SAS Institute in the USA and other countries. Inc. model GDP = LFG GAP EQP NEQ / diagnostics(all) leverage. run. No part of this publication may be reproduced. mechanical. ods graphics close. photocopying. stored in a retrieval system. ods html. ods html close. or transmitted. Sierra Information Inc. electronic. 139 ODS Statistical Graphics 140 Copyright © 2003 Sierra Information Services. Revised 10 Jan 2003 70 .ODS Statistical Graphics ods graphics on.

Sierra Information Inc. mechanical. No part of this publication may be reproduced. ® indicates USA registration. Revised 10 Jan 2003 71 . Version 8” SAS Publication Number 57241 SAS Institute Tech Support Web Page and ODS FAQs Lauren Haworth’s web site 141 ODS Resources on the SAS Institute Web Site SAS Institute Technical Support Resources for ODS can be found on their web site at: http://support.Learning More About ODS Haworth. in any form or by any other means. SAS is a trademark of SAS Institute in the USA and other countries. Inc. stored in a retrieval system. “Output Delivery System: The Basics” SAS Publication Number 58087 “The Complete Guide to the SAS Output Delivery System. electronic. photocopying.sas. without the prior written permission of the publisher. or otherwise. or transmitted.com/rnd/base/ 142 Copyright © 2003 Sierra Information Services. Lauren.

photocopying. ® indicates USA registration.Lauren Haworth’s Web Site Lauren Haworth. in any form or by any other means. without the prior written permission of the publisher. Inc. No part of this publication may be reproduced.laurenhaworth. author of SAS BBU texts “Output Delivery System: The Basics” and of “PROC TABULATE By Example” has placed several of her SAS user group papers on her web site. You can browse/download them from www.com/publications. electronic. stored in a retrieval system. mechanical. or transmitted. Sierra Information Inc. or otherwise. SAS is a trademark of SAS Institute in the USA and other countries. Revised 10 Jan 2003 72 .htm 143 Lauren Haworth’s ODS Style Paper 144 Copyright © 2003 Sierra Information Services.

Revised 10 Jan 2003 73 . No part of this publication may be reproduced.Forthcoming BBU Titles about ODS Bernadette Johnson’s Instant ODS CD/PROC TEMPLATE SAS BBU Publication Delivery System Sunil Gupta. Sierra Information Inc. or transmitted. or otherwise. ® indicates USA registration. mechanical. photocopying. Inc. SAS is a trademark of SAS Institute in the USA and other countries. in any form or by any other means. Quick Results with the Output Carpenter Series SAS BBU Publication Just Released! 145 Thanks for Attending! Questions? Comments? 146 Copyright © 2003 Sierra Information Services. stored in a retrieval system. without the prior written permission of the publisher. electronic.