01-25-2018 08:04 PM
I have used following code to obtain percentages for some cardiac procedure complications, over the period of 10 years.
proc freq data=library.CRT;
tables (died complication1 complimortality majorcompli majcomplimortality hemreqtrans) *year /chisq;
Title 'Table 2- yearwise- 0051';
I got the ouput that look like this:
To test the trend I need to obtain the p value ( to compare 10 counts of percentages over 10 years),by using Cuzick test for trend in SAS.
Is there any easy/simple way without using any macro to accomplish this in SAS? I have never used this test before.
Any help would be greatly appreciated!
01-26-2018 03:06 PM - edited 03-12-2018 11:45 PM
You would probably do better with the stratum adjusted Spearman rank correlation coefficient. It is hidden in proc freq as described here:
To get the p-value for your data, create a dataset with columns Complication, Year, and Value.
Then run the program:
proc freq data=myData; table Complication * Year * Value / scores=ridit cmh1 noprint; ods output cmh=stratSpearman; run; proc print data=stratSpearman noobs; where statistic=1; run;
03-12-2018 04:49 PM
Is is possible for you to post the link (that you've shared in the following message) again? For some reason, it opens the same message window.