Search the site...

SASCRUNCH TRAINING
  • Home
  • Member's Area
  • How to Start
  • SAS Interface
  • Creating a Data Set
  • Practical SAS Training Course
  • SAS Certified Specialist Training Program
  • Proc SQL Course
  • Introduction to Time Series Analysis
  • SAS Project Training Course
  • Full Training / Membership
  • Sign up
  • About us
  • Contact us
  • Home
  • Member's Area
  • How to Start
  • SAS Interface
  • Creating a Data Set
  • Practical SAS Training Course
  • SAS Certified Specialist Training Program
  • Proc SQL Course
  • Introduction to Time Series Analysis
  • SAS Project Training Course
  • Full Training / Membership
  • Sign up
  • About us
  • Contact us
Sentry Page Protection
Please Wait...
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.

Example
Picture

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;
Picture

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:
Picture

The STAT data set is created:
Picture

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;
Picture
The TRESULTS data set is created containing the t-tests results:
Picture

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:
  • Summary Statistics
  • Confidence Limits
  • Equality of Variance
  • Ttests results
Next

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.

Already a member? Go to member's area.