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

I am trying to get the table with the Shapiro-Wilk in it.

 

The "normaltest" command gives 7 tables, but I just want the one.

 

So if I had to several thousand variables, how could I restrict the output to just table per variable?

 

proc univariate data=my.data normaltest;
where time=0;
var weight;

 

Many thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

See the methods here to capture the results. 

http://blogs.sas.com/content/iml/2017/01/09/ods-output-any-statistic.html

 

There's also usually an OUTPUT or OUT option in many procs that allow you to capture output. You can review the documentation for the procedure of interest to find the relevant syntax. Univariate has the OUTTABLE option on the PROC UNIVARIATE statement as well as the OUT statement.

https://support.sas.com/documentation/cdl/en/procstat/70116/HTML/default/viewer.htm#procstat_univari...

 

 

OUTTABLE=SAS-data-set

creates an output data set that contains univariate statistics arranged in tabular form, with one observation per analysis variable. See the section OUTTABLE= Output Data Set for details.

 

You may want to look at OUTTABLE

 

View solution in original post

2 REPLIES 2
Reeza
Super User

See the methods here to capture the results. 

http://blogs.sas.com/content/iml/2017/01/09/ods-output-any-statistic.html

 

There's also usually an OUTPUT or OUT option in many procs that allow you to capture output. You can review the documentation for the procedure of interest to find the relevant syntax. Univariate has the OUTTABLE option on the PROC UNIVARIATE statement as well as the OUT statement.

https://support.sas.com/documentation/cdl/en/procstat/70116/HTML/default/viewer.htm#procstat_univari...

 

 

OUTTABLE=SAS-data-set

creates an output data set that contains univariate statistics arranged in tabular form, with one observation per analysis variable. See the section OUTTABLE= Output Data Set for details.

 

You may want to look at OUTTABLE

 

Jbhammon
Calcite | Level 5

proc univariate data=my.data normaltest;
where time=0;
var weight;

 


ODS SELECT 'Tests for Normality';
RUN;

 

This line did what I needed.  Thanks for the lead.

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 2668 views
  • 0 likes
  • 2 in conversation