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.
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.
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.
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;
@Rick_SAS @PaigeMiller Thankyou. Its working perfectly
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.