Presentation is loading. Please wait.

Presentation is loading. Please wait.

SAS Output Delivery System

Similar presentations


Presentation on theme: "SAS Output Delivery System"— Presentation transcript:

1 SAS Output Delivery System
HRP Nov 13th, 2013 Copyright © Leland Stanford Junior University. All rights reserved. Warning: This presentation is protected by copyright law and international treaties. Unauthorized reproduction of this presentation, or any portion of it, may result in severe civil and criminal penalties and will be prosecuted to maximum extent possible under the law.

2 Find heart in the sashelp library
Double click

3

4

5

6 3x3 with just the Chi-Square
I want to have a 3x3 table with a chi-square text. The default output has too many statistics:

7 I want this.

8

9 You set the default output to include HTML pages.

10 Erase the title and footnote.

11

12 Control Say you want only the contingency table and the chi-square statistic… Play with the code.

13 Not needed Fix the file name. Remove the extra stuff

14 crosstabfreqs chisq Notice the output is generating two tables. I want to know the names so I can cut down the second table to only include the first Chi-Square.

15 Request the names of the output tables in the listing output.
Turn it off. ods listing ; ods trace on / listing; PROC FREQ DATA = sashelp.heart; TABLES Weight_Status * BP_Status / NOCOL NOPERCENT CHISQ; RUN; ods trace off;

16 Request the names of the output tables in the log
Turn it off.

17 ODS voodoo For procedures that generate a lot of output-tables you can tell it which to select or exclude. You can tell SAS to save the output of a table into a dataset (usually in the work library).

18 Same info in work and the report

19 Print Chi-square Notice the filter

20 Remember the ;

21 This works but has an extra table

22

23 Don’t display the statistics
You can turn off all the output and still have it write the table of statistics into the work library. The ODS destination name (it may be different for you)!

24 Solution Print the table without doing the statistics.
Calculate the chi-square

25

26

27 Cleaning Up Macros (and other SAS programs) often use temporary datasets. It is good form to delete them. This code silently deletes the theChi table from the work library:

28 The Macro

29

30 Pretty Web Pages Text to appear as a title and in the Table of Contents I frequently use the program name as the title.

31 This sets the titles that will appear on the tabs of your web pages.
Add the labels for the table of contents after the label= Copy and paste this block of code before each procedure that makes output.

32 Notice this and this


Download ppt "SAS Output Delivery System"

Similar presentations


Ads by Google