Sentry Page Protection

**Statistical Analysis [5-7]**

**ODS Output**

Creating the output data set from Proc ttest is a little different than the other Proc Steps.

You need to use the ODS (Output Delivery System) to create the output data sets.

Let's take a look at the VITAL data set again.

You need to use the ODS (Output Delivery System) to create the output data sets.

Let's take a look at the VITAL data set again.

__Example__To create the output data sets, you will have to add an ods statement before Proc TTest:

__Example__

ODS Output Statistics=Stat;

Proc ttest Data=Vital;

Class Trt;

Var SBP;

Run;

The ODS Output statement tells SAS to create an output data set.

The STATISTICS option tells SAS to create a new data set called STAT that contains the statistics from Proc ttest:

The STAT data set is created:

Beside the STATISTICS option, there are 5 additional output data sets that can be created:

**STATISTICS:**Summary Statistics**CONFLIMITS:**Confidence Limits**EQUALITY:**Equality of Variance Test**EQUIVLIMITS:**Confidence Limits for Means**EQUIVTESTS:**Equivalence t tests**TTESTS:**t tests

__Example__

ODS Output Ttests = tresults;

Proc ttest Data=Vital;

Class Trt;

Var SBP;

Run;

The TRESULTS data set is created containing the t-tests results:

**Exercise**

Let's take a look at the CAMPAIGN data set again.

Conduct a two-sample t-test and find out if the purchases from one group significantly differ from the other.

Create the following four output data sets:

Create the following four output data sets:

- Summary Statistics
- Confidence Limits
- Equality of Variance
- Ttests results

*Need some help?*

**HINT: **

You can list all of the output data sets in one ODS statement.

**SOLUTION: **

ODS Output

Statistics = Stat

Conflimits = confl

Equality = Equa

Ttests = tresults;

Proc ttest data=campaign;

class group;

var purchase;

run;

Fill out my online form.