From the course: SAS Essential Training: 1 Descriptive Analysis for Healthcare Research

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Example of ODS with PROC UNIVARIATE

Example of ODS with PROC UNIVARIATE - SAS Tutorial

From the course: SAS Essential Training: 1 Descriptive Analysis for Healthcare Research

Start my 1-month free trial

Example of ODS with PROC UNIVARIATE

- In this movie, we'll use the ODS with PROC UNIVARIATE. Please note, I am using exercise file 415_ODS for PROC UNIVARIATE. For the demonstration, we are going to do PROC UNIVARIATE on SLEPTIM1, or average hours of sleep per night, but we are going to stratify these results by asthma status. So, remember we have to start with a PROC SORT on asthma status. That little prep code is here. Let's highlight and run it to get it out of the way. Okay, now here is our ODS, but we don't know the tables in PROC UNIVARIATE, yet. So we start by running the ODS without the output statement. Here is our PROC UNIVARIATE code, with the var variable as SLEPTIM1 and the by variable as ASTHMA3. Then our RUN command and we turn the trace off. Let's run this code, then look at the log file. Wow, we got a lot of tables out this time. The first three tables are named Moments, BasicMeasures, and TestForLocation. There are some more, but we already know we want the first table named Moments. So let's go back…

Contents