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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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
  • 2 replies
  • 2277 views
  • 0 likes
  • 2 in conversation