Obsidian | Level 7

## 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

1 ACCEPTED SOLUTION

Accepted Solutions
Opal | Level 21

## 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
12 REPLIES 12
Barite | Level 11

## 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.

Obsidian | Level 7

## 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).

Opal | Level 21

## Re: Trend test for Incidence rates over the years

What have you tried, so far?

PG
Obsidian | Level 7

## 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!

Opal | Level 21

## 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
Calcite | Level 5

## 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 = 41Prob > |tau| under H0: Tau=0 Year Prevalence 0.44634<.0001
 Year Prevalence 1974 16.943 1975 19.6 1976 18.934 1977 18.48 1978 19.924 1979 12.369 1980 17.302 1981 15.954 1982 16.75 1983 17.184 1984 17.722 1985 19.008 1986 18.452 1987 16.744 1988 17.029 1989 17.643 1990 17.179
Opal | Level 21

## 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
Obsidian | Level 7

## 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!

Calcite | Level 5

## 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.

Opal | Level 21

## 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
Opal | Level 21

## Re: Trend test for Incidence rates over the years

Did something happen around 2001?

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
Obsidian | Level 7

## 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

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