Programming the statistical procedures from SAS

Non parametric Cuzick test for trend in SAS

Reply
Regular Contributor
Posts: 189

Non parametric Cuzick test for trend in SAS

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

 

 

 

 

 

 

 

 

 

 

SAS Super FREQ
Posts: 4,237

Re: Non parametric Cuzick test for trend in SAS

Posted in reply to Ashwini_uci

If you have access to the SAS/IML language, you can use this blog post and program to get started.

Esteemed Advisor
Posts: 5,519

Re: Non parametric Cuzick test for trend in SAS

[ Edited ]
Posted in reply to Ashwini_uci

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
Regular Contributor
Posts: 189

Re: Non parametric Cuzick test for trend in SAS

Thank you! This was helpful!

 

Ashwini

Regular Contributor
Posts: 189

Re: Non parametric Cuzick test for trend in SAS

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

Esteemed Advisor
Posts: 5,519

Re: Non parametric Cuzick test for trend in SAS

Posted in reply to Ashwini_uci

Sorry. I corrected the link.

PG
Regular Contributor
Posts: 189

Re: Non parametric Cuzick test for trend in SAS

Thank you!

Ask a Question
Discussion stats
  • 6 replies
  • 270 views
  • 4 likes
  • 3 in conversation