Hi,
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;
where crt51=1;
Title 'Table 2- yearwise- 0051';
run;
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!
Thanks,
Ashwini
If you have access to the SAS/IML language, you can use this blog post and program to get started.
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;
(untested)
Thank you! This was helpful!
Ashwini
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.
Thanks!
Ashwini
Sorry. I corrected the link.
Thank you!
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.