BookmarkSubscribeRSS Feed
Ashwini_uci
Obsidian | Level 7

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:

 

 

trend.JPG

 

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

 

 

 

 

 

 

 

 

 

 

6 REPLIES 6
PGStats
Opal | Level 21

You would probably do better with the stratum adjusted Spearman rank correlation coefficient. It is hidden in proc freq as described here:

 

http://documentation.sas.com/?docsetId=statug&docsetTarget=statug_freq_details90.htm&docsetVersion=1...

 

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)

 

PG
Ashwini_uci
Obsidian | Level 7

Thank you! This was helpful!

 

Ashwini

Ashwini_uci
Obsidian | Level 7

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

PGStats
Opal | Level 21

Sorry. I corrected the link.

PG
Ashwini_uci
Obsidian | Level 7

Thank you!

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is ANOVA?

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.

Discussion stats
  • 6 replies
  • 2704 views
  • 4 likes
  • 3 in conversation