I've conducted a T-Test in Enterprise Guide and it has generated a report with all of the data I need. However, this data is not very useful to me in report form. Is there a way to extract some of the data (a particular table with the p-value) from the SAS Report and make it a queryable data table?
Thanks.
Ah yes, the fun with EG.
You can't with EG 4.3 as far as I can see with the GUI interface.
You can with code.
ods table ttest=mytable;
proc ttest data=sashelp.class;
class sex;
var height;
run;
That should create a table called mytable that has the info you want.
In general you can do that for most procs and you can find the table names from the doc or running a proc between ods trace on; SAS CODE; ods trace off;
Sorry, but I don't think that you could get an output table from PROC TTEST (which is the procedure that runs the T-Test task).
It also sends it's out put to ODS Graphics destinations, which can't be pointed to a table.
Maybe there is another procedure that will do this, I don't know since I'm not a statistician.
Linus
Ah yes, the fun with EG.
You can't with EG 4.3 as far as I can see with the GUI interface.
You can with code.
ods table ttest=mytable;
proc ttest data=sashelp.class;
class sex;
var height;
run;
That should create a table called mytable that has the info you want.
In general you can do that for most procs and you can find the table names from the doc or running a proc between ods trace on; SAS CODE; ods trace off;
If you use PROC TTEST, and ODS TRACE, you will see that the name of the object you want is TTESTS (with an 'S') I do not believe that using just TTEST will work. TRACE information for PROC TTEST is shown below.
cynthia
Output Added:
-------------
Name: Statistics
Label: Statistics
Template: Stat.TTest.Statistics
Path: Ttest.Height.Statistics
Label Path: 'The Ttest Procedure'.Height.'Statistics'
-------------
Output Added:
-------------
Name: ConfLimits
Label: Confidence Limits
Template: Stat.TTest.ConfLimits
Path: Ttest.Height.ConfLimits
Label Path: 'The Ttest Procedure'.Height.'Confidence Limits'
-------------
Output Added:
-------------
Name: TTests
Label: T-Tests
Template: Stat.TTest.TTests
Path: Ttest.Height.TTests
Label Path: 'The Ttest Procedure'.Height.'T-Tests'
-------------
Output Added:
-------------
Name: Equality
Label: Equality of Variances
Template: Stat.TTest.Equality
Path: Ttest.Height.Equality
Label Path: 'The Ttest Procedure'.Height.'Equality of Variances'
-------------
This is correct Cynthia, and thank you. I appreciate you clearing this up. Before any responses were posted I had managed to dig all of this info up in the help file, so when Reeza posted the information I gave it a only quick glance. When referencing the table you do need "TTests" and not just "TTest"
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.