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

Hello all,

Am tring to use proc capability to do a test of normal distribution. But since this procedure is very new to me, I will be grateful for any help. Here is my code

proc capability data=sashelp.heart normaltest; 
*CHECKINDICES(test=SW );
var agechddiag;
run;

I only wish to output the Shapiro-Wilk (SW), Kolmogorov-Smirnov (KS) test. I taught I could use the 

CHECKINDICES(test=SW|KS) statements as stated in the sas documentation but I still get all tables outputted. I only need the table with the Normaldistribution. 

 

My second question is how can I output this as a sas table. I used output out= myoutdata but I got 0 observations outputted. 

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

I don't know why you get all tests when you use CHECKINDICES

 

ods output testsfornormality=tests;

This outputs all tests of normality to data set TESTS. If you don't want certain ones, then you can delete the ones you don't want.

--
Paige Miller

View solution in original post

3 REPLIES 3
PaigeMiller
Diamond | Level 26

I don't know why you get all tests when you use CHECKINDICES

 

ods output testsfornormality=tests;

This outputs all tests of normality to data set TESTS. If you don't want certain ones, then you can delete the ones you don't want.

--
Paige Miller
Rick_SAS
SAS Super FREQ

To test the normality of a variable in the data set, use the NORMALTEST option. You will get a table that contains four statistics, including the KS.

 

In addition, the CHECKINDICES option will output a message such as

Warning: Normality is rejected for alpha = 0.05 using the Shapiro-Wilk test

 

proc capability data=sashelp.heart normaltest CHECKINDICES(test=SW );
   var agechddiag;
   specs lsl=40 usl=90;
run; 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 3 replies
  • 503 views
  • 1 like
  • 3 in conversation