I'm completely new to SAS and I'm desperate.
So, my code is:
DATA abc;
INPUT AA BB CC DD EE;
CARDS;
;
RUN;
PROC PRINT DATA = abc;
TITLE "My_Data";
RUN;
PROC UNIVARIATE DATA = abc OUTTABLE = Table NOPRINT;
VAR AA BB CC DD EE;
RUN;
PROC PRINT DATA = Table LABEL NOOBS;
TITLE "Univariate Normality Tests per Variable";
VAR _VAR_ _NORMAL_ _PROBN_;
LABEL _VAR_ = 'VARIABLE';
RUN;
I have a problem with the 'Univariate Normality Tests per Variable' table -- it contains zeros. My wish is to have only a table of normality tests statistics for every variable to compare them as it is advised (i.e. here). I've implemented a SAS macro but it contains only one such a test. Please, help me.
If you just want the Normality test statistics in one table for all variables, I'd suggest using ODS.
e.g.
ods listing close;
ods output TestsForNormality=NormaliltyTest;
PROC UNIVARIATE DATA = abc normal;
VAR AA BB CC DD EE;
RUN;
ods listing;
PROC PRINT DATA = NormaliltyTest LABEL NOOBS;
TITLE "Univariate Normality Tests per Variable";
RUN;
It appears that you need the NORMAL option in the PROC UNIVARIATE statement.
PROC UNIVARIATE DATA = abc OUTTABLE = Table NORMAL NOPRINT;
VAR AA BB CC DD EE;
RUN;
This does not output a test for each variable per test, but it is a start.
PROC UNIVARIATE Documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With