abc
abc

Reputation: 177

Normality Tests in SAS

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.

Upvotes: 5

Views: 11178

Answers (2)

cmjohns
cmjohns

Reputation: 4475

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;

Upvotes: 3

Justin Giboney
Justin Giboney

Reputation: 3301

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

Upvotes: 1

Related Questions