Help using Base SAS procedures

Trend test for Incidence rates over the years

Accepted Solution Solved
Reply
Contributor
Posts: 59
Accepted Solution

Trend test for Incidence rates over the years

 

Hi,

I need advice about how to calculate a significance test (trend test) for comparing the incidence rates over the years. I need to comment on whether there is a significant increase or decreas (with p-value for a trend) for incidence rates over the years.

 

Please see the attached data. My denominator for incidence is 100,000 for all.

 

I would really appreciate if anyone can help me with the SAS code.

 

Thanks,

Satish


Accepted Solutions
Solution
‎11-24-2015 03:43 PM
Respected Advisor
Posts: 4,651

Re: Trend test for Incidence rates over the years

A popular test for detecting trends in timeseries is the Kendall Tau-b correlation, available in proc corr and proc freq :

 


proc corr data=trendtest kendall;
var year; with amortality_pan;
run;

 

 

PG

View solution in original post


All Replies
Valued Guide
Posts: 858

Re: Trend test for Incidence rates over the years

You should give more information regarding the calculations.  While I'm sure there are several that know exactly what you want I do no. 

Contributor
Posts: 59

Re: Trend test for Incidence rates over the years

Thanks for the reply. The incidence rates are the trends for acute pancreatitis deaths nationally over the years. I wanted to know if there is an increase or decrease in trend over the years. The incidence rates are adjusted for 2010 population (national US population).

 

 

Respected Advisor
Posts: 4,651

Re: Trend test for Incidence rates over the years

What have you tried, so far?

PG
Contributor
Posts: 59

Re: Trend test for Incidence rates over the years

I have not done the trend test for comparing rates over the years to check for significance. However, I did Cochran- Armitage Trend test previously for categorical variable. So I am not sure how to do this. I looked up some online blogs about linear regression analysis but not entirely sure. I hope this helps.

 

Thanks!

Solution
‎11-24-2015 03:43 PM
Respected Advisor
Posts: 4,651

Re: Trend test for Incidence rates over the years

A popular test for detecting trends in timeseries is the Kendall Tau-b correlation, available in proc corr and proc freq :

 


proc corr data=trendtest kendall;
var year; with amortality_pan;
run;

 

 

PG
New Contributor
Posts: 2

Re: Trend test for Incidence rates over the years

Hi, I have a similar question like this. After doing this step, how could I interpret the 0.4463? What is the trend for the data? Since the prevalence or the incidence are not normally distributed, could I just use Simple Regression Model and get the coefficient for the trend? Or is there any other suggestion for this situation? I have a sample data like below. Thanks a lot. 

Kendall Tau b Correlation Coefficients, N = 41
Prob > |tau| under H0: Tau=0

 

Year

Prevalence

0.44634
<.0001

YearPrevalence
197416.943
197519.6
197618.934
197718.48
197819.924
197912.369
198017.302
198115.954
198216.75
198317.184
198417.722
198519.008
198618.452
198716.744
198817.029
198917.643
199017.179
Respected Advisor
Posts: 4,651

Re: Trend test for Incidence rates over the years

You will get a lot more attention if you submit your question as a new topic.

 

You can get a robust estimate of the slope called Sen's slope (or the Kendall slope estimator) as:

 

proc sql;
create table slope as
select 
    median( (b.prevalence-a.prevalence) / (b.year-a.year) ) as senSlope
from
    myData as a inner join 
    myData as b on a.year < b.year;
select * from slope;
quit;
PG
Contributor
Posts: 59

Re: Trend test for Incidence rates over the years

HI PGStats,

Can you please respond to my other post "Trend Test for Incidence"

 

Thanks you!

New Contributor
Posts: 2

Re: Trend test for Incidence rates over the years

Thanks a lot. It works and report a number 0.189. Could I interpret 0.189 as each year the prevalence is increasing 0.189 (the annual year of change). Is that correct? I really appreciate for your help.

 

 

Respected Advisor
Posts: 4,651

Re: Trend test for Incidence rates over the years

I( guess so. But I haven't seen your code, or your full dataset. Make sure you understand what you are doing.

PG
Respected Advisor
Posts: 4,651

Re: Trend test for Incidence rates over the years

Did something happen around 2001?

 

SGPlot1.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

If so you should test before and after separately:

 

libname xl Excel "&sasforum.\Datasets\Trendtest.xlsx" access=readonly;

proc sql;
create table trendtest as
select *, year>=2001 as period from xl.'Sheet1$'n;
quit;

proc sgplot data=trendtest;
scatter x=year y=amortality_pan;
refline 2001 / axis=x;
run;

proc corr data=trendtest kendall;
by period;
var year; with amortality_pan;
run;
PG
Contributor
Posts: 59

Re: Trend test for Incidence rates over the years

Hi PGStats,

Thanks for the response. I am not sure if there was anything significant in 2001 but recently over the years, the trends decreased due to improved diagnostic tests.

 

Satish

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 12 replies
  • 2083 views
  • 2 likes
  • 4 in conversation