Computing for research introduction to sas ods
Download
1 / 15

Computing for Research Introduction to SAS ODS - PowerPoint PPT Presentation


  • 61 Views
  • Uploaded on

Computing for Research Introduction to SAS ODS. Annie N. Simpson, MSc. Some ODS is “Experimental”. What is ODS?. ODS=Output Delivery System SAS procedures produce output objects

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Computing for Research Introduction to SAS ODS' - sigourney-sandoval


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Computing for research introduction to sas ods

Computing for ResearchIntroduction to SAS ODS

Annie N. Simpson, MSc.


Some ods is experimental
Some ODS is “Experimental”

BMTRY 789 Introduction to SAS Programming


What is ods
What is ODS?

  • ODS=Output Delivery System

  • SAS procedures produce output objects

  • ODS allows these objects to be wrangled, organized, and used in many ways…printing, producing graphics files, creating new data from Procedures, etc.

BMTRY 789 Introduction to SAS Programming


Ods output to files
ODS Output to files…

Odsrtffile=‘complete file path’;

Procedures you want written out to the file;

ODSrtfclose;

(may replace all “rtf” with “pdf” or “html”)

BMTRY 789 Introduction to SAS Programming


ProcFormat;

Value $coffee 'esp'='Espresso'

'cap'='Cappuccino'

'kon'='Kona'

'ice'='Ice Coffee'

;

Value $Deliv 'w'='Walk-in'

'd'='Drive-up'

;

Run;

Odsrtffile = ‘C:\Data\CoffeeFreq.rtf’;

ProcFreqData = coffee;

Tables TypeD TypeD*TypeC;

Format TypeD $Deliv. TypeC $coffee.;

;

Run;

ODSrtfclose;

BMTRY 789 Introduction to SAS Programming


Do the proc gplot demo
Do the Proc gPlot Demo…

BMTRY 789 Introduction to SAS Programming


Ods trace
ODS Trace

  • Use ODS Trace to find out what OBJECTS SAS is creating when you run a PROC or DATA step.

  • Knowing this information will allow you to select only the information you want to work with.

BMTRY 789 Introduction to SAS Programming


Ods trace1
ODS Trace

***Trace Results will be in the LOG***;

ODS TRACE ON;

*Procedures and/or Data steps go here;

ODS TRACE OFF;

***Trace Results will be in the Listing***;

ODS TRACE ON / Listing;

*Procedures and/or Data steps go here;

ODS TRACE OFF;

BMTRY 789 Introduction to SAS Programming


Ods trace2
ODS Trace

ODSTraceon;

ProcFreqData = coffee;

Tables TypeD /chisq;

Tables TypeD*TypeC;

Format TypeD $Deliv. TypeC $coffee.;

Label TypeC = "Type of Coffee"

TypeD = "Type of Delivery"

;

Run;

ODSTraceoff;

BMTRY 789 Introduction to SAS Programming



BMTRY 789 Introduction to SAS Programming


Libname annie “C:\DATA”; into a new output data set…

ODSOutput"One-Way Frequencies"=Annie.Freqs;

ProcFreqData = coffee;

Tables TypeD /chisq;

Tables TypeD*TypeC;

Format TypeD $Deliv. TypeC $coffee.;

Label TypeC = "Type of Coffee"

TypeD = "Type of Delivery"

;

Run;

ODSOutputclose;

BMTRY 789 Introduction to SAS Programming


Ods graphics
ODS Graphics into a new output data set…

  • Basic code is:

    ODS graphics on;

    procregdata=fitness;

    model Oxygen=RunTime Age RestPulse;

    run;

    Quit;

    ODS graphics off;

BMTRY 789 Introduction to SAS Programming


Ods graphics1
ODS Graphics into a new output data set…

  • How do we Name graphs?

  • How do we Save graphs?

  • How do we Change styles?

  • How do we Edit graphs?

  • Lets Take a look at the ODS demo sample code…

BMTRY 789 Introduction to SAS Programming


Insert gif image here
Insert .gif Image Here… into a new output data set…

BMTRY 789 Introduction to SAS Programming


ad