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
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;
You should give more information regarding the calculations. While I'm sure there are several that know exactly what you want I do no.
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).
What have you tried, so far?
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!
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;
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 | |
| Year |
Prevalence | 0.44634 |
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 |
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;
HI PGStats,
Can you please respond to my other post "Trend Test for Incidence"
Thanks you!
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.
I( guess so. But I haven't seen your code, or your full dataset. Make sure you understand what you are doing.
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;
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
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.