SAS Output Delivery System HRP 223 2012 Nov

  • Slides: 31
Download presentation
SAS Output Delivery System HRP 223 - 2012 Nov 28 th, 2012 Copyright ©

SAS Output Delivery System HRP 223 - 2012 Nov 28 th, 2012 Copyright © 1999 -2012 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.

Find heart in the sashelp library Double click

Find heart in the sashelp library Double click

3 x 3 with just the Chi-Square • I want to have a 3

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

You set the default output to include HTML pages.

You set the default output to include HTML pages.

Erase the title and footnote.

Erase the title and footnote.

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

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

Not needed Fix the file name. Remove the extra stuff

Not needed Fix the file name. Remove the extra stuff

crosstabfreqs Notice the output is generating two tables. I want to know the names

crosstabfreqs 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. chisq

Request the names of the output tables in the listing output. Turn it off.

Request the names of the output tables in the listing output. Turn it off.

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

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

ODS voodoo • For procedures that generate a lot of outputtables you can tell

ODS voodoo • For procedures that generate a lot of outputtables 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).

Same info in work and the report

Same info in work and the report

Notice the filter Print Chi-square

Notice the filter Print Chi-square

Remember the ;

Remember the ;

This works but has an extra table

This works but has an extra table

Don’t display the statistics • You can turn off all the output and still

Don’t display the statistics • You can turn off all the output and still have it write the table of statistics into the work The ODS destination name library.

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

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

Cleaning Up • Macros (and other SAS programs) often use temporary datasets. It is

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

The Macro

The Macro

Pretty Web Pages Text to appear as titles and in the Table of Contents

Pretty Web Pages Text to appear as titles and in the Table of Contents

This sets the titles that will appear on the tabs of your web pages.

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

Notice this and this

Notice this and this