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