sas output delivery system. find heart in the sashelp library double click

25
SAS Output Delivery System

Post on 19-Dec-2015

221 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: SAS Output Delivery System. Find heart in the sashelp library Double click

SAS Output Delivery System

Page 2: SAS Output Delivery System. Find heart in the sashelp library Double click

Find heart in the sashelp library

Double click

Page 3: SAS Output Delivery System. Find heart in the sashelp library Double click
Page 4: SAS Output Delivery System. Find heart in the sashelp library Double click
Page 5: SAS Output Delivery System. Find heart in the sashelp library Double click
Page 6: SAS Output Delivery System. Find heart in the sashelp library Double click
Page 7: SAS Output Delivery System. Find heart in the sashelp library Double click

You set the default output to include HTML pages.

Page 8: SAS Output Delivery System. Find heart in the sashelp library Double click

Erase the title and footnote.

Page 9: SAS Output Delivery System. Find heart in the sashelp library Double click
Page 10: SAS Output Delivery System. Find heart in the sashelp library Double click

Control

• Say you want only the contingency table and the chi-square statistic…

• Play with the code.

Page 11: SAS Output Delivery System. Find heart in the sashelp library Double click

Not needed

Fix the file name.

Remove the extra stuff

Page 12: SAS Output Delivery System. Find heart in the sashelp library Double click

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.

crosstabfreqs

chisq

Page 13: SAS Output Delivery System. Find heart in the sashelp library Double click

Request the names of the output tables in the log

Turn it off.

Page 14: SAS Output Delivery System. Find heart in the sashelp library Double click

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).

Page 15: SAS Output Delivery System. Find heart in the sashelp library Double click

Same info in work and the report

Page 16: SAS Output Delivery System. Find heart in the sashelp library Double click

Print Chi-squareNotice the filter

Page 17: SAS Output Delivery System. Find heart in the sashelp library Double click

Remember the ;

Page 18: SAS Output Delivery System. Find heart in the sashelp library Double click

This works but has an extra table

Page 19: SAS Output Delivery System. Find heart in the sashelp library Double click
Page 20: SAS Output Delivery System. Find heart in the sashelp library Double click

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

Page 21: SAS Output Delivery System. Find heart in the sashelp library Double click

Calculate the chi-square

Print the table without doing the statistics.

Solution

Page 22: SAS Output Delivery System. Find heart in the sashelp library Double click
Page 23: SAS Output Delivery System. Find heart in the sashelp library Double click
Page 24: SAS Output Delivery System. Find heart in the sashelp library Double click

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:

Page 25: SAS Output Delivery System. Find heart in the sashelp library Double click

The Macro