BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Anthony
Calcite | Level 5

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

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;

View solution in original post

4 REPLIES 4
LinusH
Tourmaline | Level 20

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

Data never sleeps
Reeza
Super User

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;

Cynthia_sas
SAS Super FREQ

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'
-------------

        

Anthony
Calcite | Level 5

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"

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1336 views
  • 3 likes
  • 4 in conversation